/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * DirectorMainFrame.java
 *
 * Created on Aug 27, 2011, 5:44:46 PM
 */
package Views;

import Controllers.AccountController;
import Controllers.CriminalController;
import Controllers.DBUtility;
import Controllers.PrisonerController;
import Controllers.PropertiesUtility;
import Controllers.WantedController;
import Models.Criminal;
import Models.Prisoner;
import Models.Wanted;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.io.File;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Vector;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.Box;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import Models.Account;
import Controllers.CaseHistoryDAO;
import Models.Cases;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import Models.PostMortem;
import Controllers.AccountDAO;
import Models.Account;
import Controllers.CaseHistoryDAO;
import Models.Cases;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import Models.PostMortem;
import Controllers.ManagingPosMortemDAO;

/**
 *
 * @author TranDangThuan
 */
public class OfficerMainFrame extends javax.swing.JFrame {

    ArrayList<Criminal> criminalList = new ArrayList<Criminal>();
    ArrayList<Wanted> wantedList = new ArrayList<Wanted>();
    ArrayList<Prisoner> prisonerList = new ArrayList<Prisoner>();
    Connection conn = null;
    private DefaultComboBoxModel comModel;
    private DefaultTableModel tblModel;
    private List<Integer> accIDList = new ArrayList<Integer>();
    private int selectedRow; //used select item in  jtable
    private DefaultTableModel tblModel_FIR;
    private DefaultTableModel tblModel_Pos;
    private List<Integer> caseIDList = new ArrayList<Integer>();

    /** Creates new form DirectorMainFrame */
    public OfficerMainFrame() {
        initComponents();

        criminalList = CriminalController.GetCriminals();
        wantedList = WantedController.GetWanteds();
        prisonerList = PrisonerController.GetPrisoners();
        conn = DBUtility.openConnection();
        //First, the tables must be filled with data
        LoadCriminalData(criminalList);
        LoadCriminalCase(criminalList);
        LoadWantedData(wantedList);
        LoadPrisonerData(prisonerList);
        //I must add the Selection Listener for tbl_CriminalCase manually because the tool doesn't support it
        tbl_CriminalCase.getSelectionModel().addListSelectionListener(tbl_CriminalCaseSelected());
        tbl_CriminalRecord.getSelectionModel().addListSelectionListener(tbl_CriminalRecordSelected());

        //Load Tab Case
        tblModel = new DefaultTableModel();
        tblModel.addColumn("ID");
        tblModel.addColumn("Case Type");
        tblModel.addColumn("Case Time");
        tblModel.addColumn("Reported Time");
        tblModel.addColumn("Approval Date");
        //tblModel.addColumn("Place");
        //tblModel.addColumn("Descriptions");
        tblModel.addColumn("Involvements");
        tblModel.addColumn("Status");
        tblModel.addColumn("Prosecution Desire");
        tblModel.addColumn("Lead OfficerID");
        tblCaseHistory.setModel(tblModel);

        comModel = new DefaultComboBoxModel();
        comLeadOfficerID.setModel(comModel);
        loadDataCombobox();
        //loadDataTable();
        txtCaseID.enable(false);

        //FIR
        tblModel_FIR = new DefaultTableModel();
        tblModel_FIR.addColumn("ID");
        tblModel_FIR.addColumn("Case Type");
        tblModel_FIR.addColumn("Case Time");
        tblModel_FIR.addColumn("Reported Time");
        tblModel_FIR.addColumn("Place");
        tblModel_FIR.addColumn("Descriptions");
        tblModel_FIR.addColumn("Involvements");
        tblModel_FIR.addColumn("Status");
        tblModel_FIR.addColumn("Prosecution Desire");
        tblModel_FIR.addColumn("Lead OfficerID");
        tblFIRManagement.setModel(tblModel_FIR);

        //PostMortem
        tblModel_Pos = new DefaultTableModel();
        tblModel_Pos.addColumn("Mortality ID");
        tblModel_Pos.addColumn("Mortality Name");
        tblModel_Pos.addColumn("Mortality Time");
        tblModel_Pos.addColumn("Case ID");
        tblModel_Pos.addColumn("Check In Date");
        tblModel_Pos.addColumn("Cause Of Death");
        tblModel_Pos.addColumn("Doctor Name");
        tblPosmortem.setModel(tblModel_Pos);
        loadDataCaseCombobox();
        loadDataAllTable();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jTabbedPane3 = new javax.swing.JTabbedPane();
        jPanel30 = new javax.swing.JPanel();
        jPanel31 = new javax.swing.JPanel();
        jLabel52 = new javax.swing.JLabel();
        jScrollPane11 = new javax.swing.JScrollPane();
        tblCaseHistory = new javax.swing.JTable();
        jPanel32 = new javax.swing.JPanel();
        ckProsecution = new javax.swing.JCheckBox();
        jScrollPane12 = new javax.swing.JScrollPane();
        txtCaseDescriptions1 = new javax.swing.JTextArea();
        jLabel53 = new javax.swing.JLabel();
        jLabel54 = new javax.swing.JLabel();
        comLeadOfficerID = new javax.swing.JComboBox();
        jLabel55 = new javax.swing.JLabel();
        jLabel56 = new javax.swing.JLabel();
        jLabel64 = new javax.swing.JLabel();
        txtCasetype = new javax.swing.JTextField();
        jLabel65 = new javax.swing.JLabel();
        jLabel66 = new javax.swing.JLabel();
        spnnCaseTime = new javax.swing.JSpinner();
        jLabel67 = new javax.swing.JLabel();
        spnnReportTime = new javax.swing.JSpinner();
        spnnApprovalDate = new javax.swing.JSpinner();
        jLabel68 = new javax.swing.JLabel();
        jLabel69 = new javax.swing.JLabel();
        jScrollPane13 = new javax.swing.JScrollPane();
        txtCasePlace1 = new javax.swing.JTextArea();
        combCaseStatus = new javax.swing.JComboBox();
        jScrollPane14 = new javax.swing.JScrollPane();
        txtCaseInvolvements1 = new javax.swing.JTextArea();
        jLabel70 = new javax.swing.JLabel();
        txtCaseID = new javax.swing.JTextField();
        jLabel71 = new javax.swing.JLabel();
        jPanel33 = new javax.swing.JPanel();
        butSearch = new javax.swing.JButton();
        butAddNew = new javax.swing.JButton();
        butShow = new javax.swing.JButton();
        butEdit = new javax.swing.JButton();
        butDetail = new javax.swing.JButton();
        butReset = new javax.swing.JButton();
        jPanel34 = new javax.swing.JPanel();
        jPanel35 = new javax.swing.JPanel();
        jLabel72 = new javax.swing.JLabel();
        jScrollPane15 = new javax.swing.JScrollPane();
        tblFIRManagement = new javax.swing.JTable();
        jPanel36 = new javax.swing.JPanel();
        jLabel73 = new javax.swing.JLabel();
        jLabel74 = new javax.swing.JLabel();
        jLabel75 = new javax.swing.JLabel();
        jLabel76 = new javax.swing.JLabel();
        txtDelayReasons = new javax.swing.JTextField();
        txtInformationType = new javax.swing.JTextField();
        txtOffencePlace = new javax.swing.JTextField();
        jLabel77 = new javax.swing.JLabel();
        txtInformerPhone = new javax.swing.JTextField();
        comLeadOfficerID1 = new javax.swing.JComboBox();
        jLabel78 = new javax.swing.JLabel();
        txtInformerAddress = new javax.swing.JTextField();
        jLabel79 = new javax.swing.JLabel();
        jLabel80 = new javax.swing.JLabel();
        txtStolenProperties = new javax.swing.JTextField();
        jLabel81 = new javax.swing.JLabel();
        jScrollPane16 = new javax.swing.JScrollPane();
        txtSuspectDescriptions = new javax.swing.JTextArea();
        jLabel82 = new javax.swing.JLabel();
        txtInformerName = new javax.swing.JTextField();
        jLabel83 = new javax.swing.JLabel();
        txtOffenceTime = new javax.swing.JTextField();
        jLabel84 = new javax.swing.JLabel();
        txtFIRTime = new javax.swing.JTextField();
        txtStolenValue = new javax.swing.JTextField();
        jPanel37 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        butEdit1 = new javax.swing.JButton();
        butAddNew1 = new javax.swing.JButton();
        butSearch1 = new javax.swing.JButton();
        jPanel38 = new javax.swing.JPanel();
        jPanel39 = new javax.swing.JPanel();
        jLabel85 = new javax.swing.JLabel();
        jScrollPane17 = new javax.swing.JScrollPane();
        tblPosmortem = new javax.swing.JTable();
        jPanel40 = new javax.swing.JPanel();
        jLabel86 = new javax.swing.JLabel();
        comboxCaseID = new javax.swing.JComboBox();
        jLabel87 = new javax.swing.JLabel();
        jLabel88 = new javax.swing.JLabel();
        jLabel89 = new javax.swing.JLabel();
        spnnMortalityTime = new javax.swing.JSpinner();
        jLabel90 = new javax.swing.JLabel();
        jLabel91 = new javax.swing.JLabel();
        spnnCheckInDate = new javax.swing.JSpinner();
        jScrollPane18 = new javax.swing.JScrollPane();
        txtMortalityName = new javax.swing.JTextArea();
        jScrollPane19 = new javax.swing.JScrollPane();
        txtCauseOfDeath = new javax.swing.JTextArea();
        jScrollPane20 = new javax.swing.JScrollPane();
        txtDoctorName = new javax.swing.JTextArea();
        jPanel41 = new javax.swing.JPanel();
        butEdit2 = new javax.swing.JButton();
        butSearch2 = new javax.swing.JButton();
        butAddNew2 = new javax.swing.JButton();
        butShow1 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        addComplaint1 = new Views.AddComplaint();
        jPanel3 = new javax.swing.JPanel();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel4 = new javax.swing.JPanel();
        jSplitPane1 = new javax.swing.JSplitPane();
        jPanel6 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        txtCriminalFullName = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        cbxCriminalGender = new javax.swing.JComboBox();
        txtCriminalPlaceOfBirth = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        txtCriminalNationality = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        spnMinCriminalDOB = new javax.swing.JSpinner();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        spnMaxCriminalDOB = new javax.swing.JSpinner();
        btn_FilterCriminal = new javax.swing.JButton();
        btn_ResetCriminal = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jLabel16 = new javax.swing.JLabel();
        txtCriminalAliases = new javax.swing.JTextField();
        cbxCriminalIsArrested = new javax.swing.JComboBox();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        spnMinCriminalArrestTIme = new javax.swing.JSpinner();
        jLabel20 = new javax.swing.JLabel();
        spnMaxCriminalArrestTime = new javax.swing.JSpinner();
        jPanel5 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        spnMinCriminalHeight = new javax.swing.JSpinner();
        spnMaxCriminalHeight = new javax.swing.JSpinner();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        spnMaxCriminalWeight = new javax.swing.JSpinner();
        jLabel12 = new javax.swing.JLabel();
        spnMinCriminalWeight = new javax.swing.JSpinner();
        jLabel13 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        txtCriminalHair = new javax.swing.JTextField();
        txtCriminalRace = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        btn_AddCriminal = new javax.swing.JButton();
        btn_EditCriminal = new javax.swing.JButton();
        btn_DetailedCriminal = new javax.swing.JButton();
        btn_Refresh = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbl_Criminals = new javax.swing.JTable();
        jPanel12 = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        tbl_CriminalCase = new javax.swing.JTable();
        btn_RefreshCriminalCase = new javax.swing.JButton();
        jPanel14 = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        tbl_CriminalRecord = new javax.swing.JTable();
        jPanel19 = new javax.swing.JPanel();
        jLabel27 = new javax.swing.JLabel();
        lblCaseType = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        lblCaseTime = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jScrollPane7 = new javax.swing.JScrollPane();
        txtCasePlace = new javax.swing.JTextArea();
        jScrollPane8 = new javax.swing.JScrollPane();
        txtCaseInvolvements = new javax.swing.JTextArea();
        lblInvolvements = new javax.swing.JLabel();
        jScrollPane9 = new javax.swing.JScrollPane();
        txtCaseDescriptions = new javax.swing.JTextArea();
        jLabel40 = new javax.swing.JLabel();
        jPanel15 = new javax.swing.JPanel();
        jSplitPane2 = new javax.swing.JSplitPane();
        jPanel16 = new javax.swing.JPanel();
        jPanel17 = new javax.swing.JPanel();
        btn_DetailedWanted = new javax.swing.JButton();
        btn_RefreshWanted = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        tbl_Wanted = new javax.swing.JTable();
        jPanel18 = new javax.swing.JPanel();
        btn_ResetWanted = new javax.swing.JButton();
        btn_FilterWanted = new javax.swing.JButton();
        spnMaxWantedDate = new javax.swing.JSpinner();
        jLabel35 = new javax.swing.JLabel();
        spnMinWantedDate = new javax.swing.JSpinner();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        spnMaxBountyMoney = new javax.swing.JSpinner();
        jLabel57 = new javax.swing.JLabel();
        jLabel58 = new javax.swing.JLabel();
        spnMinBountyMoney = new javax.swing.JSpinner();
        jLabel36 = new javax.swing.JLabel();
        spnMinSightingTime = new javax.swing.JSpinner();
        jLabel59 = new javax.swing.JLabel();
        jLabel60 = new javax.swing.JLabel();
        jLabel61 = new javax.swing.JLabel();
        spnMaxSightingTime = new javax.swing.JSpinner();
        txtSightingPlace = new javax.swing.JTextField();
        jLabel62 = new javax.swing.JLabel();
        jLabel63 = new javax.swing.JLabel();
        cbxInEffect = new javax.swing.JComboBox();
        jPanel20 = new javax.swing.JPanel();
        jSplitPane3 = new javax.swing.JSplitPane();
        jPanel21 = new javax.swing.JPanel();
        btn_FilterPrisoner = new javax.swing.JButton();
        btn_ResetPrisoner = new javax.swing.JButton();
        jLabel21 = new javax.swing.JLabel();
        spnMinImprisonDate = new javax.swing.JSpinner();
        jLabel33 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        spnMaxImprisonDate = new javax.swing.JSpinner();
        jLabel22 = new javax.swing.JLabel();
        txtPrisonName = new javax.swing.JTextField();
        txtCellNumber = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        chxHasReleaseDate = new javax.swing.JCheckBox();
        spnMaxReleaseDate = new javax.swing.JSpinner();
        jLabel38 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        spnMinReleaseDate = new javax.swing.JSpinner();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        cbxIsReleased = new javax.swing.JComboBox();
        jLabel26 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        txtReleaseReason = new javax.swing.JTextArea();
        jPanel22 = new javax.swing.JPanel();
        jPanel23 = new javax.swing.JPanel();
        btn_AddPrisoner = new javax.swing.JButton();
        btn_EditPrisoner = new javax.swing.JButton();
        btn_DetailedPrisoner = new javax.swing.JButton();
        btn_RefreshPrisoner = new javax.swing.JButton();
        jScrollPane3 = new javax.swing.JScrollPane();
        tbl_Prisoner = new javax.swing.JTable();
        menuBar = new javax.swing.JMenuBar();
        accountMenu = new javax.swing.JMenu();
        profile = new javax.swing.JMenuItem();
        logOut = new javax.swing.JMenuItem();
        exit = new javax.swing.JMenuItem();
        jMenu1 = new javax.swing.JMenu();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Crime File System");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        jTabbedPane1.setTabPlacement(javax.swing.JTabbedPane.LEFT);

        jLabel52.setBackground(new java.awt.Color(204, 204, 255));
        jLabel52.setFont(new java.awt.Font("Times New Roman", 1, 18));
        jLabel52.setText("CASE HISTORY DETAILS MANAGEMENT ");

        tblCaseHistory.setBorder(new javax.swing.border.MatteBorder(null));
        tblCaseHistory.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        tblCaseHistory.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tblCaseHistoryMouseClicked(evt);
            }
        });
        jScrollPane11.setViewportView(tblCaseHistory);

        jPanel32.setBackground(new java.awt.Color(204, 204, 204));
        jPanel32.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        ckProsecution.setFont(new java.awt.Font("Tahoma", 0, 13));
        ckProsecution.setText("Prosecuted");

        txtCaseDescriptions1.setColumns(20);
        txtCaseDescriptions1.setRows(5);
        jScrollPane12.setViewportView(txtCaseDescriptions1);

        jLabel53.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel53.setText("Prosecution Desire:");

        jLabel54.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel54.setText("Case Type:");

        comLeadOfficerID.setFont(new java.awt.Font("Tahoma", 0, 13));
        comLeadOfficerID.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel55.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel55.setText("Case Place:");

        jLabel56.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel56.setText("Serial Number:");

        jLabel64.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel64.setText("Case Time:");

        jLabel65.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel65.setText("Approval Date:");

        jLabel66.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel66.setText("Reported Time:");

        spnnCaseTime.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(-946796400000L), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnnCaseTime.setEditor(new javax.swing.JSpinner.DateEditor(spnnCaseTime, "MM/dd/yyyy"));

        jLabel67.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel67.setText("Case Involvements:");

        spnnReportTime.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnnReportTime.setEditor(new javax.swing.JSpinner.DateEditor(spnnReportTime, "MM/dd/yyyy"));

        spnnApprovalDate.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnnApprovalDate.setEditor(new javax.swing.JSpinner.DateEditor(spnnApprovalDate, "MM/dd/yyyy"));
        spnnApprovalDate.setEnabled(false);

        jLabel68.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel68.setText("Case Status:");

        jLabel69.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel69.setText("Case Descriptions:");

        txtCasePlace1.setColumns(20);
        txtCasePlace1.setRows(5);
        jScrollPane13.setViewportView(txtCasePlace1);

        combCaseStatus.setFont(new java.awt.Font("Tahoma", 0, 13));
        combCaseStatus.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4" }));

        txtCaseInvolvements1.setColumns(20);
        txtCaseInvolvements1.setRows(5);
        jScrollPane14.setViewportView(txtCaseInvolvements1);

        jLabel70.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel70.setText("Cases ID");

        jLabel71.setText("Search");

        javax.swing.GroupLayout jPanel32Layout = new javax.swing.GroupLayout(jPanel32);
        jPanel32.setLayout(jPanel32Layout);
        jPanel32Layout.setHorizontalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel32Layout.createSequentialGroup()
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel32Layout.createSequentialGroup()
                                .addComponent(jLabel64, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                            .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel32Layout.createSequentialGroup()
                                        .addComponent(jLabel54, javax.swing.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)
                                        .addGap(72, 72, 72))
                                    .addGroup(jPanel32Layout.createSequentialGroup()
                                        .addComponent(jLabel55, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(81, 81, 81))
                                    .addGroup(jPanel32Layout.createSequentialGroup()
                                        .addComponent(jLabel65, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                                .addGroup(jPanel32Layout.createSequentialGroup()
                                    .addComponent(jLabel66, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                                .addGroup(jPanel32Layout.createSequentialGroup()
                                    .addComponent(jLabel70)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))))
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel32Layout.createSequentialGroup()
                                        .addComponent(spnnApprovalDate, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel32Layout.createSequentialGroup()
                                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(txtCasetype, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
                                            .addComponent(spnnCaseTime, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)
                                            .addComponent(spnnReportTime, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE))
                                        .addGap(29, 29, 29)))
                                .addGroup(jPanel32Layout.createSequentialGroup()
                                    .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))
                            .addGroup(jPanel32Layout.createSequentialGroup()
                                .addComponent(txtCaseID, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel32Layout.createSequentialGroup()
                        .addComponent(jLabel71)
                        .addGap(93, 93, 93)))
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel32Layout.createSequentialGroup()
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel32Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jLabel53, javax.swing.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE))
                            .addComponent(jLabel68, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE)
                            .addComponent(jLabel67, javax.swing.GroupLayout.DEFAULT_SIZE, 115, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)
                            .addComponent(combCaseStatus, 0, 143, Short.MAX_VALUE)
                            .addComponent(ckProsecution, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel32Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel69, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE)
                            .addComponent(jLabel56, javax.swing.GroupLayout.DEFAULT_SIZE, 107, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(comLeadOfficerID, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jScrollPane12, javax.swing.GroupLayout.DEFAULT_SIZE, 151, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel32Layout.setVerticalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel32Layout.createSequentialGroup()
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel67, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE)
                            .addComponent(txtCasetype, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel54))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnnCaseTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel64)))
                    .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 65, Short.MAX_VALUE))
                .addGap(12, 12, 12)
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel68, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(spnnReportTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel66))
                    .addComponent(combCaseStatus, javax.swing.GroupLayout.Alignment.LEADING))
                .addGap(43, 43, 43)
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(ckProsecution, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel53, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(spnnApprovalDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel65)))
                .addGap(26, 26, 26)
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel55, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel32Layout.createSequentialGroup()
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jScrollPane13, javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
                            .addComponent(jScrollPane12, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(comLeadOfficerID)
                            .addComponent(jLabel56, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(txtCaseID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel70))
                        .addGap(133, 133, 133)))
                .addContainerGap())
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addComponent(jLabel71)
                .addGap(147, 147, 147)
                .addComponent(jLabel69, javax.swing.GroupLayout.DEFAULT_SIZE, 19, Short.MAX_VALUE)
                .addGap(218, 218, 218))
        );

        jPanel33.setBackground(new java.awt.Color(204, 204, 204));
        jPanel33.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));

        butSearch.setFont(new java.awt.Font("Tahoma", 0, 14));
        butSearch.setText("Search By CaseType");
        butSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                butSearchActionPerformed(evt);
            }
        });

        butAddNew.setFont(new java.awt.Font("Tahoma", 0, 13));
        butAddNew.setText("Add New");
        butAddNew.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                butAddNewActionPerformed(evt);
            }
        });

        butShow.setFont(new java.awt.Font("Tahoma", 0, 13));
        butShow.setText("Show All");
        butShow.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                butShowActionPerformed(evt);
            }
        });

        butEdit.setFont(new java.awt.Font("Tahoma", 0, 13));
        butEdit.setText("Edit");
        butEdit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                butEditActionPerformed(evt);
            }
        });

        butDetail.setFont(new java.awt.Font("Tahoma", 0, 13));
        butDetail.setText("Row Detail ");
        butDetail.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                butDetailActionPerformed(evt);
            }
        });

        butReset.setFont(new java.awt.Font("Tahoma", 0, 13));
        butReset.setText("Reset ");
        butReset.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                butResetActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel33Layout = new javax.swing.GroupLayout(jPanel33);
        jPanel33.setLayout(jPanel33Layout);
        jPanel33Layout.setHorizontalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel33Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(butReset, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
                    .addComponent(butSearch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(butEdit, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
                    .addComponent(butShow, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
                    .addComponent(butDetail, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE))
                .addContainerGap())
            .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel33Layout.createSequentialGroup()
                    .addGap(12, 12, 12)
                    .addComponent(butAddNew, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE)
                    .addContainerGap()))
        );
        jPanel33Layout.setVerticalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel33Layout.createSequentialGroup()
                .addGap(54, 54, 54)
                .addComponent(butEdit)
                .addGap(18, 18, 18)
                .addComponent(butSearch)
                .addGap(26, 26, 26)
                .addComponent(butShow)
                .addGap(27, 27, 27)
                .addComponent(butDetail)
                .addGap(36, 36, 36)
                .addComponent(butReset)
                .addContainerGap(30, Short.MAX_VALUE))
            .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel33Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(butAddNew)
                    .addContainerGap(280, Short.MAX_VALUE)))
        );

        javax.swing.GroupLayout jPanel31Layout = new javax.swing.GroupLayout(jPanel31);
        jPanel31.setLayout(jPanel31Layout);
        jPanel31Layout.setHorizontalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 815, Short.MAX_VALUE)
            .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel31Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jScrollPane11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 795, Short.MAX_VALUE)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel31Layout.createSequentialGroup()
                            .addGap(119, 119, 119)
                            .addComponent(jLabel52))
                        .addGroup(jPanel31Layout.createSequentialGroup()
                            .addComponent(jPanel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGap(10, 10, 10)
                            .addComponent(jPanel33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap()))
        );
        jPanel31Layout.setVerticalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 681, Short.MAX_VALUE)
            .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel31Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel52)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jPanel32, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jScrollPane11, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30);
        jPanel30.setLayout(jPanel30Layout);
        jPanel30Layout.setHorizontalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addComponent(jPanel31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(185, Short.MAX_VALUE))
        );
        jPanel30Layout.setVerticalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addComponent(jPanel31, javax.swing.GroupLayout.PREFERRED_SIZE, 566, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(136, Short.MAX_VALUE))
        );

        jTabbedPane3.addTab("Case", jPanel30);

        jLabel72.setFont(new java.awt.Font("Times New Roman", 1, 18));
        jLabel72.setText("FIR MANAGEMENT ");

        tblFIRManagement.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane15.setViewportView(tblFIRManagement);

        jLabel73.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel73.setText("Information Type:");

        jLabel74.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel74.setText("Informer Phone:");

        jLabel75.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel75.setText("Informer Address:");

        jLabel76.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel76.setText("Suspect Descriptions:");

        txtDelayReasons.setFont(new java.awt.Font("Tahoma", 0, 13));

        txtInformationType.setFont(new java.awt.Font("Tahoma", 0, 13));

        txtOffencePlace.setFont(new java.awt.Font("Tahoma", 0, 13));

        jLabel77.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel77.setText("Offence Place:");

        comLeadOfficerID1.setFont(new java.awt.Font("Tahoma", 0, 13));
        comLeadOfficerID1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel78.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel78.setText("Stolen Properties:");

        jLabel79.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel79.setText("Stolen Value:");

        jLabel80.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel80.setText("Delay Reasons:");

        txtStolenProperties.setFont(new java.awt.Font("Tahoma", 0, 13));

        jLabel81.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel81.setText("Cases ID:");

        txtSuspectDescriptions.setColumns(20);
        txtSuspectDescriptions.setRows(5);
        jScrollPane16.setViewportView(txtSuspectDescriptions);

        jLabel82.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel82.setText("Informer Name:");

        txtInformerName.setFont(new java.awt.Font("Tahoma", 0, 13));

        jLabel83.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel83.setText("Offence Time:");

        jLabel84.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel84.setText("FIR Time:");

        txtFIRTime.setFont(new java.awt.Font("Tahoma", 0, 13));

        txtStolenValue.setFont(new java.awt.Font("Tahoma", 0, 13));

        javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36);
        jPanel36.setLayout(jPanel36Layout);
        jPanel36Layout.setHorizontalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel36Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel82)
                    .addComponent(jLabel81)
                    .addComponent(jLabel73)
                    .addComponent(jLabel74)
                    .addComponent(jLabel75)
                    .addComponent(jLabel83)
                    .addComponent(jLabel77))
                .addGap(55, 55, 55)
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtOffencePlace, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                    .addComponent(txtInformationType, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                    .addComponent(txtInformerPhone, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                    .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(comLeadOfficerID1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(txtInformerName, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE)
                        .addComponent(txtInformerAddress, javax.swing.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)
                        .addComponent(txtOffenceTime)))
                .addGap(48, 48, 48)
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel84)
                    .addComponent(jLabel76)
                    .addComponent(jLabel79)
                    .addComponent(jLabel78)
                    .addComponent(jLabel80))
                .addGap(24, 24, 24)
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane16, 0, 0, Short.MAX_VALUE)
                    .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(txtStolenProperties)
                        .addComponent(txtDelayReasons)
                        .addComponent(txtStolenValue, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(txtFIRTime, javax.swing.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel36Layout.setVerticalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel36Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtFIRTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel81)
                        .addComponent(comLeadOfficerID1))
                    .addComponent(jLabel84))
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel36Layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel82)
                            .addComponent(txtInformerName))
                        .addGap(12, 12, 12))
                    .addGroup(jPanel36Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtDelayReasons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel80))))
                .addGap(8, 8, 8)
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtStolenProperties, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel78)
                        .addComponent(txtInformerAddress)
                        .addComponent(jLabel75)))
                .addGap(18, 18, 18)
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel74)
                        .addComponent(txtInformerPhone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel36Layout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtStolenValue, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel79))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel36Layout.createSequentialGroup()
                                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel76)
                                    .addComponent(txtOffenceTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel73))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(txtInformationType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel83))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(txtOffencePlace)
                                    .addComponent(jLabel77)))
                            .addComponent(jScrollPane16, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(30, 30, 30))
        );

        jButton1.setFont(new java.awt.Font("Tahoma", 0, 13));
        jButton1.setText("Show");

        butEdit1.setText("Edit");

        butAddNew1.setFont(new java.awt.Font("Tahoma", 0, 13));
        butAddNew1.setText("Add New");

        butSearch1.setFont(new java.awt.Font("Tahoma", 0, 14));
        butSearch1.setText("Search");

        javax.swing.GroupLayout jPanel37Layout = new javax.swing.GroupLayout(jPanel37);
        jPanel37.setLayout(jPanel37Layout);
        jPanel37Layout.setHorizontalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 102, Short.MAX_VALUE)
            .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel37Layout.createSequentialGroup()
                    .addGap(9, 9, 9)
                    .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(jButton1, 0, 0, Short.MAX_VALUE)
                        .addComponent(butSearch1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(butEdit1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(butAddNew1, javax.swing.GroupLayout.Alignment.LEADING))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        jPanel37Layout.setVerticalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 187, Short.MAX_VALUE)
            .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel37Layout.createSequentialGroup()
                    .addGap(18, 18, 18)
                    .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel37Layout.createSequentialGroup()
                            .addGap(41, 41, 41)
                            .addComponent(butEdit1))
                        .addComponent(butAddNew1))
                    .addGap(18, 18, 18)
                    .addComponent(butSearch1)
                    .addGap(26, 26, 26)
                    .addComponent(jButton1)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35);
        jPanel35.setLayout(jPanel35Layout);
        jPanel35Layout.setHorizontalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 807, Short.MAX_VALUE)
            .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel35Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel35Layout.createSequentialGroup()
                            .addGap(280, 280, 280)
                            .addComponent(jLabel72))
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel35Layout.createSequentialGroup()
                            .addComponent(jPanel36, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(jPanel37, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addComponent(jScrollPane15, javax.swing.GroupLayout.DEFAULT_SIZE, 787, Short.MAX_VALUE))
                    .addContainerGap()))
        );
        jPanel35Layout.setVerticalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 521, Short.MAX_VALUE)
            .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel35Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel72)
                    .addGap(18, 18, 18)
                    .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(jPanel37, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jPanel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane15, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        javax.swing.GroupLayout jPanel34Layout = new javax.swing.GroupLayout(jPanel34);
        jPanel34.setLayout(jPanel34Layout);
        jPanel34Layout.setHorizontalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addComponent(jPanel35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(193, Short.MAX_VALUE))
        );
        jPanel34Layout.setVerticalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addComponent(jPanel35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(181, Short.MAX_VALUE))
        );

        jTabbedPane3.addTab("FIR", jPanel34);

        jLabel85.setBackground(new java.awt.Color(51, 0, 204));
        jLabel85.setFont(new java.awt.Font("Times New Roman", 1, 18));
        jLabel85.setText("MANAGING POSMORTEM DETAILS");

        tblPosmortem.setBackground(new java.awt.Color(204, 204, 255));
        tblPosmortem.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane17.setViewportView(tblPosmortem);

        jPanel40.setBackground(new java.awt.Color(204, 204, 255));

        jLabel86.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel86.setText("Case ID:");

        comboxCaseID.setFont(new java.awt.Font("Tahoma", 0, 13));
        comboxCaseID.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jLabel87.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel87.setText("Doctor Name:");

        jLabel88.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel88.setText("Cause Of Death:");

        jLabel89.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel89.setText("Mortality Name:");

        spnnMortalityTime.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(-946796400000L), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnnMortalityTime.setEditor(new javax.swing.JSpinner.DateEditor(spnnMortalityTime, "MM/dd/yyyy"));

        jLabel90.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel90.setText("Mortality Time:");

        jLabel91.setFont(new java.awt.Font("Tahoma", 0, 13));
        jLabel91.setText("CheckIn Date:");

        spnnCheckInDate.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(-946796400000L), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnnCheckInDate.setEditor(new javax.swing.JSpinner.DateEditor(spnnCheckInDate, "MM/dd/yyyy"));

        txtMortalityName.setColumns(20);
        txtMortalityName.setRows(5);
        jScrollPane18.setViewportView(txtMortalityName);

        txtCauseOfDeath.setColumns(20);
        txtCauseOfDeath.setRows(5);
        jScrollPane19.setViewportView(txtCauseOfDeath);

        txtDoctorName.setColumns(20);
        txtDoctorName.setRows(5);
        jScrollPane20.setViewportView(txtDoctorName);

        javax.swing.GroupLayout jPanel40Layout = new javax.swing.GroupLayout(jPanel40);
        jPanel40.setLayout(jPanel40Layout);
        jPanel40Layout.setHorizontalGroup(
            jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel40Layout.createSequentialGroup()
                .addGap(17, 17, 17)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel90)
                    .addComponent(jLabel89)
                    .addComponent(jLabel91))
                .addGap(10, 10, 10)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(spnnCheckInDate)
                    .addComponent(spnnMortalityTime)
                    .addComponent(jScrollPane18, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel87)
                    .addComponent(jLabel88)
                    .addComponent(jLabel86))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane19, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)
                    .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(comboxCaseID, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane20, javax.swing.GroupLayout.DEFAULT_SIZE, 147, Short.MAX_VALUE)))
                .addGap(32, 32, 32))
        );
        jPanel40Layout.setVerticalGroup(
            jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel40Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane18, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)
                    .addComponent(jLabel89)
                    .addComponent(jLabel88)
                    .addComponent(jScrollPane19, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel40Layout.createSequentialGroup()
                        .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnnMortalityTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel90)
                            .addComponent(jLabel87))
                        .addGap(34, 34, 34)
                        .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnnCheckInDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel91)))
                    .addComponent(jScrollPane20, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(comboxCaseID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel86))
                .addGap(49, 49, 49))
        );

        jPanel41.setBackground(new java.awt.Color(204, 204, 255));

        butEdit2.setFont(new java.awt.Font("Tahoma", 0, 13));
        butEdit2.setText("Edit");

        butSearch2.setFont(new java.awt.Font("Tahoma", 0, 14));
        butSearch2.setText("Search");

        butAddNew2.setFont(new java.awt.Font("Tahoma", 0, 13));
        butAddNew2.setText("Add New");
        butAddNew2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                butAddNew2ActionPerformed(evt);
            }
        });

        butShow1.setFont(new java.awt.Font("Tahoma", 0, 13));
        butShow1.setText("Show");

        javax.swing.GroupLayout jPanel41Layout = new javax.swing.GroupLayout(jPanel41);
        jPanel41.setLayout(jPanel41Layout);
        jPanel41Layout.setHorizontalGroup(
            jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel41Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(butAddNew2, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(butEdit2, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(butSearch2, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)
                    .addComponent(butShow1, javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel41Layout.setVerticalGroup(
            jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel41Layout.createSequentialGroup()
                .addGap(15, 15, 15)
                .addComponent(butAddNew2)
                .addGap(18, 18, 18)
                .addComponent(butEdit2)
                .addGap(29, 29, 29)
                .addComponent(butSearch2)
                .addGap(26, 26, 26)
                .addComponent(butShow1)
                .addContainerGap(68, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel39Layout = new javax.swing.GroupLayout(jPanel39);
        jPanel39.setLayout(jPanel39Layout);
        jPanel39Layout.setHorizontalGroup(
            jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 674, Short.MAX_VALUE)
            .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel39Layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jScrollPane17, javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel39Layout.createSequentialGroup()
                                .addComponent(jPanel40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jPanel41, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel39Layout.createSequentialGroup()
                            .addGap(145, 145, 145)
                            .addComponent(jLabel85)))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        jPanel39Layout.setVerticalGroup(
            jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 532, Short.MAX_VALUE)
            .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel39Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel85)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(jPanel41, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanel40, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()))
        );

        javax.swing.GroupLayout jPanel38Layout = new javax.swing.GroupLayout(jPanel38);
        jPanel38.setLayout(jPanel38Layout);
        jPanel38Layout.setHorizontalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel38Layout.createSequentialGroup()
                .addComponent(jPanel39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(326, Short.MAX_VALUE))
        );
        jPanel38Layout.setVerticalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel38Layout.createSequentialGroup()
                .addComponent(jPanel39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(170, Short.MAX_VALUE))
        );

        jTabbedPane3.addTab("PostMortem", jPanel38);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jTabbedPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 1005, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jTabbedPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("CASES", new javax.swing.ImageIcon(getClass().getResource("/resources/images/case.png")), jPanel1); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(addComplaint1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(20, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(addComplaint1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(177, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("COMPLAINTS", new javax.swing.ImageIcon(getClass().getResource("/resources/images/complaint.png")), jPanel2); // NOI18N

        jSplitPane1.setDividerLocation(200);
        jSplitPane1.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        jSplitPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "Filter Field"));

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Identification Info"));

        jLabel1.setText("Full Name:");

        jLabel2.setText("Gender:");

        cbxCriminalGender.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Both", "Male", "Female" }));

        jLabel3.setText("Place of birth:");

        jLabel4.setText("Nationality:");

        jLabel5.setText("Date of birth (mm/dd/yyyy):");

        spnMinCriminalDOB.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(-946796400000L), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMinCriminalDOB.setEditor(new javax.swing.JSpinner.DateEditor(spnMinCriminalDOB, "MM/dd/yyyy"));

        jLabel6.setText("From:");

        jLabel7.setText("To:");

        spnMaxCriminalDOB.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMaxCriminalDOB.setEditor(new javax.swing.JSpinner.DateEditor(spnMaxCriminalDOB, "MM/dd/yyyy"));

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCriminalFullName, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCriminalPlaceOfBirth, javax.swing.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 92, Short.MAX_VALUE)
                        .addComponent(cbxCriminalGender, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel7)
                            .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(spnMinCriminalDOB, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE)
                            .addComponent(spnMaxCriminalDOB, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE)))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jLabel4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCriminalNationality, javax.swing.GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE))
                    .addComponent(jLabel5))
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(txtCriminalFullName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(cbxCriminalGender, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(6, 6, 6)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtCriminalPlaceOfBirth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(txtCriminalNationality, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnMinCriminalDOB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel6))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnMaxCriminalDOB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel7))))
                .addContainerGap())
        );

        btn_FilterCriminal.setText("Filter");
        btn_FilterCriminal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_FilterCriminalActionPerformed(evt);
            }
        });

        btn_ResetCriminal.setText("Reset");
        btn_ResetCriminal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_ResetCriminalActionPerformed(evt);
            }
        });

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Criminal Activity Info"));

        jLabel16.setText("Alias:");

        cbxCriminalIsArrested.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Both", "Arrested", "Not Arrested" }));
        cbxCriminalIsArrested.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cbxCriminalIsArrestedItemStateChanged(evt);
            }
        });

        jLabel17.setText("Arrest status:");

        jLabel18.setText("Arrested time (mm/dd/yyyy):");

        jLabel19.setText("From:");

        spnMinCriminalArrestTIme.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(-946796400000L), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMinCriminalArrestTIme.setEditor(new javax.swing.JSpinner.DateEditor(spnMinCriminalArrestTIme, "MM/dd/yyyy"));

        jLabel20.setText("To:");

        spnMaxCriminalArrestTime.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMaxCriminalArrestTime.setEditor(new javax.swing.JSpinner.DateEditor(spnMaxCriminalArrestTime, "MM/dd/yyyy"));

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel18)
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cbxCriminalIsArrested, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel9Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtCriminalAliases, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel19)
                            .addComponent(jLabel20))
                        .addGap(18, 18, Short.MAX_VALUE)
                        .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(spnMaxCriminalArrestTime, 0, 0, Short.MAX_VALUE)
                            .addComponent(spnMinCriminalArrestTIme, javax.swing.GroupLayout.DEFAULT_SIZE, 126, Short.MAX_VALUE))))
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(txtCriminalAliases, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(cbxCriminalIsArrested, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel18)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(spnMinCriminalArrestTIme, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(spnMaxCriminalArrestTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Appearances"));

        jLabel8.setText("Height (cm):");

        jLabel9.setText("From:");

        jLabel10.setText("To:");

        jLabel11.setText("Weight (Kg):");

        jLabel12.setText("To:");

        jLabel13.setText("From:");

        jLabel15.setText("Hair Color:");

        jLabel14.setText("Race:");

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel14)
                            .addComponent(jLabel15))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtCriminalRace, javax.swing.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE)
                            .addComponent(txtCriminalHair, javax.swing.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE)))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel10)
                                    .addComponent(jLabel9))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(spnMaxCriminalHeight)
                                    .addComponent(spnMinCriminalHeight, javax.swing.GroupLayout.DEFAULT_SIZE, 51, Short.MAX_VALUE)))
                            .addComponent(jLabel8))
                        .addGap(31, 31, 31)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel11)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel12)
                                    .addComponent(jLabel13))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(spnMinCriminalWeight)
                                    .addComponent(spnMaxCriminalWeight, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(jLabel11))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnMinCriminalHeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel9))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnMaxCriminalHeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel10)))
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnMinCriminalWeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel13))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(spnMaxCriminalWeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel12))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtCriminalHair, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtCriminalRace, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14)))
        );

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(btn_FilterCriminal)
                        .addGap(18, 18, 18)
                        .addComponent(btn_ResetCriminal))
                    .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btn_FilterCriminal)
                            .addComponent(btn_ResetCriminal)))
                    .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(22, Short.MAX_VALUE))
        );

        jSplitPane1.setTopComponent(jPanel6);

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder("Control Panel"));

        btn_AddCriminal.setText("New Criminal");
        btn_AddCriminal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_AddCriminalActionPerformed(evt);
            }
        });

        btn_EditCriminal.setText("Modify Selected Criminal");
        btn_EditCriminal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_EditCriminalActionPerformed(evt);
            }
        });

        btn_DetailedCriminal.setText("View Detailed Profile");
        btn_DetailedCriminal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_DetailedCriminalActionPerformed(evt);
            }
        });

        btn_Refresh.setText("Refresh");
        btn_Refresh.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_RefreshActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addComponent(btn_DetailedCriminal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btn_EditCriminal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btn_AddCriminal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(btn_Refresh, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addComponent(btn_AddCriminal)
                .addGap(18, 18, 18)
                .addComponent(btn_EditCriminal)
                .addGap(18, 18, 18)
                .addComponent(btn_DetailedCriminal)
                .addGap(18, 18, 18)
                .addComponent(btn_Refresh)
                .addContainerGap(337, Short.MAX_VALUE))
        );

        tbl_Criminals.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null},
                {null, null, null, null, null, null, null}
            },
            new String [] {
                "Criminal ID", "Full Name", "Gender", "Date of birth (mm/dd/yyyy)", "Nationality", "Is Arrested?", "ArrestedTime"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Boolean.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tbl_Criminals.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tbl_Criminals.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tbl_Criminals.getTableHeader().setReorderingAllowed(false);
        jScrollPane1.setViewportView(tbl_Criminals);

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 768, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 507, Short.MAX_VALUE)
        );

        jSplitPane1.setRightComponent(jPanel10);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 961, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 713, Short.MAX_VALUE)
        );

        jTabbedPane2.addTab("Criminal Manager", jPanel4);

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Criminal List"));

        tbl_CriminalCase.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null},
                {null, null},
                {null, null},
                {null, null}
            },
            new String [] {
                "Criminal ID", "Criminal Name"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        tbl_CriminalCase.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tbl_CriminalCase.getTableHeader().setReorderingAllowed(false);
        jScrollPane5.setViewportView(tbl_CriminalCase);

        btn_RefreshCriminalCase.setText("Refresh");
        btn_RefreshCriminalCase.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_RefreshCriminalCaseActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)
                .addComponent(btn_RefreshCriminalCase)
                .addContainerGap())
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btn_RefreshCriminalCase))
                .addContainerGap(14, Short.MAX_VALUE))
        );

        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Criminal Records"));

        tbl_CriminalRecord.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Case ID", "Charged Crime", "Role in Case"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        tbl_CriminalRecord.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jScrollPane6.setViewportView(tbl_CriminalRecord);

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 548, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel19.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Detailed Record"));

        jLabel27.setText("Type:");

        lblCaseType.setText("[Case Type]");

        jLabel28.setText("Time:");

        lblCaseTime.setText("[Case Time]");

        jLabel39.setText("Crime Scene at:");

        txtCasePlace.setColumns(20);
        txtCasePlace.setEditable(false);
        txtCasePlace.setLineWrap(true);
        txtCasePlace.setRows(5);
        jScrollPane7.setViewportView(txtCasePlace);

        txtCaseInvolvements.setColumns(20);
        txtCaseInvolvements.setEditable(false);
        txtCaseInvolvements.setLineWrap(true);
        txtCaseInvolvements.setRows(5);
        jScrollPane8.setViewportView(txtCaseInvolvements);

        lblInvolvements.setText("Involvements:");

        txtCaseDescriptions.setColumns(20);
        txtCaseDescriptions.setEditable(false);
        txtCaseDescriptions.setLineWrap(true);
        txtCaseDescriptions.setRows(5);
        jScrollPane9.setViewportView(txtCaseDescriptions);

        jLabel40.setText("Full Descriptions:");

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jLabel27))
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(lblCaseType))
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel28))
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(lblCaseTime)))
                .addGap(100, 100, 100)
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addComponent(jScrollPane7)
                        .addGap(18, 18, 18)
                        .addComponent(jScrollPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)
                        .addGap(18, 18, 18))
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addComponent(jLabel39)
                        .addGap(108, 108, 108)
                        .addComponent(lblInvolvements, javax.swing.GroupLayout.DEFAULT_SIZE, 69, Short.MAX_VALUE)
                        .addGap(115, 115, 115)))
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addComponent(jLabel40, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
                        .addGap(330, 330, 330))
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 353, Short.MAX_VALUE)
                        .addGap(58, 58, 58))))
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel27)
                    .addComponent(jLabel39)
                    .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(lblInvolvements)
                        .addComponent(jLabel40)))
                .addGap(6, 6, 6)
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addComponent(lblCaseType)
                        .addGap(18, 18, 18)
                        .addComponent(jLabel28)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblCaseTime))
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jTabbedPane2.addTab("Criminal Record", jPanel12);

        jSplitPane2.setDividerLocation(200);
        jSplitPane2.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        jSplitPane2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jPanel17.setBorder(javax.swing.BorderFactory.createTitledBorder("Control Panel"));

        btn_DetailedWanted.setText("View Detailed Bounty");
        btn_DetailedWanted.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_DetailedWantedActionPerformed(evt);
            }
        });

        btn_RefreshWanted.setText("Refresh");
        btn_RefreshWanted.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_RefreshWantedActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btn_DetailedWanted, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE)
                    .addComponent(btn_RefreshWanted, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel17Layout.createSequentialGroup()
                .addComponent(btn_DetailedWanted)
                .addGap(18, 18, 18)
                .addComponent(btn_RefreshWanted)
                .addContainerGap(408, Short.MAX_VALUE))
        );

        tbl_Wanted.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "Wanted ID", "Fugitive Name", "Wanted Date (mm/dd/yyyy)", "Bounty Money (INR)", "In Effect?"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.Integer.class, java.lang.Boolean.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tbl_Wanted.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        tbl_Wanted.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tbl_Wanted.getTableHeader().setReorderingAllowed(false);
        jScrollPane2.setViewportView(tbl_Wanted);

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 768, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 507, Short.MAX_VALUE)
        );

        jSplitPane2.setRightComponent(jPanel16);

        jPanel18.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "Filter Field"));

        btn_ResetWanted.setText("Reset");
        btn_ResetWanted.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_ResetWantedActionPerformed(evt);
            }
        });

        btn_FilterWanted.setText("Filter");
        btn_FilterWanted.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_FilterWantedActionPerformed(evt);
            }
        });

        spnMaxWantedDate.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMaxWantedDate.setEditor(new javax.swing.JSpinner.DateEditor(spnMaxWantedDate, "MM/dd/yyyy"));

        jLabel35.setText("To:");

        spnMinWantedDate.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(-946796400000L), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMinWantedDate.setEditor(new javax.swing.JSpinner.DateEditor(spnMinWantedDate, "MM/dd/yyyy"));

        jLabel31.setText("Wanted Date (mm/dd/yyyy):");

        jLabel32.setText("From:");

        spnMaxBountyMoney.setModel(new javax.swing.SpinnerNumberModel(1000000000, 0, 1000000000, 1));

        jLabel57.setText("To:");

        jLabel58.setText("From:");

        spnMinBountyMoney.setModel(new javax.swing.SpinnerNumberModel(0, 0, 1000000000, 1));

        jLabel36.setText("Bounty Money (INR):");

        spnMinSightingTime.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(-946796400000L), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMinSightingTime.setEditor(new javax.swing.JSpinner.DateEditor(spnMinSightingTime, "MM/dd/yyyy"));
        spnMinSightingTime.setEnabled(false);

        jLabel59.setText("From:");

        jLabel60.setText("Sighting Time:");

        jLabel61.setText("To:");

        spnMaxSightingTime.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMaxSightingTime.setEditor(new javax.swing.JSpinner.DateEditor(spnMaxSightingTime, "MM/dd/yyyy"));
        spnMaxSightingTime.setEnabled(false);

        txtSightingPlace.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                txtSightingPlaceFocusLost(evt);
            }
        });

        jLabel62.setText("Sighting Place:");

        jLabel63.setText("In Effect?");

        cbxInEffect.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Both", "Yes", "No" }));

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addComponent(btn_FilterWanted)
                        .addGap(18, 18, 18)
                        .addComponent(btn_ResetWanted))
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel18Layout.createSequentialGroup()
                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel35)
                                    .addComponent(jLabel32))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(spnMaxWantedDate)
                                    .addComponent(spnMinWantedDate, javax.swing.GroupLayout.PREFERRED_SIZE, 84, Short.MAX_VALUE)))
                            .addComponent(jLabel31))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel18Layout.createSequentialGroup()
                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel62)
                                    .addComponent(jLabel63))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtSightingPlace, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(cbxInEffect, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanel18Layout.createSequentialGroup()
                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel36)
                                    .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel18Layout.createSequentialGroup()
                                            .addComponent(jLabel58)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(spnMinBountyMoney, 0, 0, Short.MAX_VALUE))
                                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel18Layout.createSequentialGroup()
                                            .addComponent(jLabel57)
                                            .addGap(18, 18, 18)
                                            .addComponent(spnMaxBountyMoney, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel60)
                                    .addGroup(jPanel18Layout.createSequentialGroup()
                                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel59)
                                            .addComponent(jLabel61))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(spnMaxSightingTime, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(spnMinSightingTime, 0, 0, Short.MAX_VALUE))))))))
                .addContainerGap(465, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addComponent(jLabel31)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnMinWantedDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel32))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnMaxWantedDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel35))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 78, Short.MAX_VALUE)
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(btn_FilterWanted)
                            .addComponent(btn_ResetWanted)))
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel18Layout.createSequentialGroup()
                                .addComponent(jLabel60)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel59)
                                    .addComponent(spnMinSightingTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(spnMaxSightingTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel61)))
                            .addGroup(jPanel18Layout.createSequentialGroup()
                                .addComponent(jLabel36)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel58)
                                    .addComponent(spnMinBountyMoney, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel57)
                                    .addComponent(spnMaxBountyMoney, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel62)
                            .addComponent(txtSightingPlace, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cbxInEffect, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel63))))
                .addContainerGap())
        );

        jSplitPane2.setLeftComponent(jPanel18);

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 961, Short.MAX_VALUE)
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 713, Short.MAX_VALUE)
        );

        jTabbedPane2.addTab("Wanted Fugitives", jPanel15);

        jSplitPane3.setDividerLocation(200);
        jSplitPane3.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
        jSplitPane3.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jPanel21.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "Filter Field"));

        btn_FilterPrisoner.setText("Filter");
        btn_FilterPrisoner.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_FilterPrisonerActionPerformed(evt);
            }
        });

        btn_ResetPrisoner.setText("Reset");
        btn_ResetPrisoner.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_ResetPrisonerActionPerformed(evt);
            }
        });

        jLabel21.setText("Imprison Date (mm/dd/yyyy):");

        spnMinImprisonDate.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(-946796400000L), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMinImprisonDate.setEditor(new javax.swing.JSpinner.DateEditor(spnMinImprisonDate, "MM/dd/yyyy"));

        jLabel33.setText("From:");

        jLabel37.setText("To:");

        spnMaxImprisonDate.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMaxImprisonDate.setEditor(new javax.swing.JSpinner.DateEditor(spnMaxImprisonDate, "MM/dd/yyyy"));

        jLabel22.setText("Prison Name:");

        jLabel23.setText("Cell Plate:");

        chxHasReleaseDate.setText("Has Release Date");
        chxHasReleaseDate.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                chxHasReleaseDateItemStateChanged(evt);
            }
        });

        spnMaxReleaseDate.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMaxReleaseDate.setEditor(new javax.swing.JSpinner.DateEditor(spnMaxReleaseDate, "MM/dd/yyyy"));
        spnMaxReleaseDate.setEnabled(false);

        jLabel38.setText("To:");

        jLabel34.setText("From:");

        spnMinReleaseDate.setModel(new javax.swing.SpinnerDateModel(new java.util.Date(-946796400000L), new java.util.Date(-946796400000L), new java.util.Date(), java.util.Calendar.DAY_OF_MONTH));
        spnMinReleaseDate.setEditor(new javax.swing.JSpinner.DateEditor(spnMinReleaseDate, "MM/dd/yyyy"));
        spnMinReleaseDate.setEnabled(false);

        jLabel24.setText("Release Date (mm/dd/yyyy):");

        jLabel25.setText("Is Released?");

        cbxIsReleased.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Both", "Yes", "No" }));

        jLabel26.setText("Release Reason:");

        txtReleaseReason.setColumns(20);
        txtReleaseReason.setLineWrap(true);
        txtReleaseReason.setRows(5);
        jScrollPane4.setViewportView(txtReleaseReason);

        javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
        jPanel21.setLayout(jPanel21Layout);
        jPanel21Layout.setHorizontalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel21)
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel37)
                            .addComponent(jLabel33))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(spnMaxImprisonDate, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)
                            .addComponent(spnMinImprisonDate, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)))
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addComponent(btn_FilterPrisoner)
                        .addGap(18, 18, 18)
                        .addComponent(btn_ResetPrisoner)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel22)
                    .addComponent(jLabel23))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtCellNumber, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtPrisonName, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(2, 2, 2)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(chxHasReleaseDate)
                    .addComponent(jLabel24)
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel34)
                            .addComponent(jLabel38))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(spnMinReleaseDate, javax.swing.GroupLayout.PREFERRED_SIZE, 102, Short.MAX_VALUE)
                            .addComponent(spnMaxReleaseDate, javax.swing.GroupLayout.PREFERRED_SIZE, 102, Short.MAX_VALUE))))
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addGap(15, 15, 15)
                        .addComponent(jLabel25)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(cbxIsReleased, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel26))))
                .addGap(249, 249, 249))
        );
        jPanel21Layout.setVerticalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(jLabel22)
                    .addComponent(txtPrisonName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(chxHasReleaseDate)
                    .addComponent(jLabel25)
                    .addComponent(cbxIsReleased, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnMinImprisonDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel33)
                            .addComponent(jLabel23)
                            .addComponent(txtCellNumber, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(spnMaxImprisonDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel37)))
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel24)
                            .addComponent(jLabel26))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel21Layout.createSequentialGroup()
                                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel34)
                                    .addComponent(spnMinReleaseDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel38)
                                    .addComponent(spnMaxReleaseDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(30, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel21Layout.createSequentialGroup()
                .addContainerGap(144, Short.MAX_VALUE)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btn_FilterPrisoner)
                    .addComponent(btn_ResetPrisoner))
                .addContainerGap())
        );

        jSplitPane3.setTopComponent(jPanel21);

        jPanel23.setBorder(javax.swing.BorderFactory.createTitledBorder("Control Panel"));

        btn_AddPrisoner.setText("New Imprisonment");
        btn_AddPrisoner.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_AddPrisonerActionPerformed(evt);
            }
        });

        btn_EditPrisoner.setText("Updated Select Prisoner");
        btn_EditPrisoner.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_EditPrisonerActionPerformed(evt);
            }
        });

        btn_DetailedPrisoner.setText("View Detailed Prisoner");
        btn_DetailedPrisoner.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_DetailedPrisonerActionPerformed(evt);
            }
        });

        btn_RefreshPrisoner.setText("Refresh");
        btn_RefreshPrisoner.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btn_RefreshPrisonerActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
        jPanel23.setLayout(jPanel23Layout);
        jPanel23Layout.setHorizontalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btn_DetailedPrisoner, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(btn_RefreshPrisoner, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(btn_EditPrisoner, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)
                    .addComponent(btn_AddPrisoner, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel23Layout.setVerticalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addComponent(btn_AddPrisoner)
                .addGap(18, 18, 18)
                .addComponent(btn_EditPrisoner)
                .addGap(18, 18, 18)
                .addComponent(btn_DetailedPrisoner)
                .addGap(18, 18, 18)
                .addComponent(btn_RefreshPrisoner)
                .addContainerGap(326, Short.MAX_VALUE))
        );

        tbl_Prisoner.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null},
                {null, null, null, null, null, null}
            },
            new String [] {
                "Prisoner ID", "Prisoner Name", "Imprison Date (mm/dd/yyyy)", "Release Date (mm/dd/yyyy)", "Prison Name", "Is Released?"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Boolean.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tbl_Prisoner.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        tbl_Prisoner.getTableHeader().setReorderingAllowed(false);
        jScrollPane3.setViewportView(tbl_Prisoner);

        javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
        jPanel22.setLayout(jPanel22Layout);
        jPanel22Layout.setHorizontalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel22Layout.createSequentialGroup()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 706, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(62, Short.MAX_VALUE))
        );
        jPanel22Layout.setVerticalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 507, Short.MAX_VALUE)
            .addGroup(jPanel22Layout.createSequentialGroup()
                .addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jSplitPane3.setRightComponent(jPanel22);

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 961, Short.MAX_VALUE)
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSplitPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 713, Short.MAX_VALUE)
        );

        jTabbedPane2.addTab("Prisoners", jPanel20);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 966, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(49, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 741, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("CRIMINALS", new javax.swing.ImageIcon(getClass().getResource("/resources/images/criminal.png")), jPanel3); // NOI18N

        accountMenu.setText("Option");

        profile.setText("Profile");
        profile.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                profileActionPerformed(evt);
            }
        });
        accountMenu.add(profile);

        logOut.setText("Log Out");
        logOut.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                logOutActionPerformed(evt);
            }
        });
        accountMenu.add(logOut);

        exit.setText("Exit");
        exit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitActionPerformed(evt);
            }
        });
        accountMenu.add(exit);

        menuBar.add(accountMenu);

        menuBar.add(Box.createHorizontalGlue());
        jMenu1.setText("Welcome, " + userProperties[0]);
        menuBar.add(jMenu1);

        setJMenuBar(menuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane1)
                .addGap(30, 30, 30))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane1)
                .addGap(22, 22, 22))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void exitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitActionPerformed
    File userProp = new File(System.getProperty("user.dir") + "\\user.properties");
    userProp.delete();
    Runtime.getRuntime().exit(0);
}//GEN-LAST:event_exitActionPerformed

private void logOutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logOutActionPerformed
    new Login().setVisible(true);
    File userProp = new File(System.getProperty("user.dir") + "\\user.properties");
    userProp.delete();
    this.dispose();
}//GEN-LAST:event_logOutActionPerformed

private void profileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_profileActionPerformed
    new EditProfile(this, true).setVisible(true);
}//GEN-LAST:event_profileActionPerformed

private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
    exit.doClick();
}//GEN-LAST:event_formWindowClosing

private void btn_FilterCriminalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_FilterCriminalActionPerformed
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
    SimpleDateFormat ArrestedTimeFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss");
    ArrayList<Criminal> resultList = new ArrayList<Criminal>();

    //The parameters will be sent through a HashMap because it can retain the object's type
    //and the code will be shorter
    HashMap parametersMap = new HashMap();
    parametersMap.put("FullName", txtCriminalFullName.getText().trim());
    String _gender = "";
    if (cbxCriminalGender.getSelectedIndex() == 1) {
        _gender = "1";
    } else if (cbxCriminalGender.getSelectedIndex() == 2) {
        _gender = "0";
    }
    parametersMap.put("Gender", _gender);
    Date _minDOB = null;
    Date _maxDOB = null;
    try {
        String dateString = formatter.format(spnMinCriminalDOB.getValue());
        _minDOB = formatter.parse(dateString);
        dateString = formatter.format(spnMaxCriminalDOB.getValue());
        _maxDOB = formatter.parse(dateString);
    } catch (ParseException ex) {
        Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
    }
    parametersMap.put("MinDOB", _minDOB);
    parametersMap.put("MaxDOB", _maxDOB);
    parametersMap.put("PlaceOfBirth", txtCriminalPlaceOfBirth.getText().trim());
    parametersMap.put("Nationality", txtCriminalNationality.getText().trim());
    parametersMap.put("MinHeight", Integer.parseInt(spnMinCriminalHeight.getValue().toString()));
    parametersMap.put("MaxHeight", Integer.parseInt(spnMaxCriminalHeight.getValue().toString()));
    parametersMap.put("MinWeight", Integer.parseInt(spnMinCriminalWeight.getValue().toString()));
    parametersMap.put("MaxWeight", Integer.parseInt(spnMaxCriminalWeight.getValue().toString()));
    parametersMap.put("Hair", txtCriminalHair.getText().trim());
    parametersMap.put("Race", txtCriminalRace.getText().trim());
    parametersMap.put("Aliases", txtCriminalAliases.getText().trim());
    Date _minArrestedTime = null;
    Date _maxArrestedTime = null;
    try {
        String dateString = ArrestedTimeFormat.format(spnMinCriminalArrestTIme.getValue());
        _minArrestedTime = ArrestedTimeFormat.parse(dateString);
        dateString = ArrestedTimeFormat.format(spnMaxCriminalArrestTime.getValue());
        _maxArrestedTime = ArrestedTimeFormat.parse(dateString);
    } catch (ParseException ex) {
        Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
    }
    parametersMap.put("MinArrestedTime", _minArrestedTime);
    parametersMap.put("MaxArrestedTime", _maxArrestedTime);
    String _isarrested = "";
    //We have 2 filter mode for Criminals table, one for arrest status specific, one for both
    //This is because we cannot select the entire table with supplied MinArrestedDate and MaxArrestedDate
    if (cbxCriminalIsArrested.getSelectedIndex() == 1) {
        _isarrested = "1";
        parametersMap.put("IsArrested", _isarrested);
        resultList = CriminalController.FilterCriminal(parametersMap);
    } else if (cbxCriminalIsArrested.getSelectedIndex() == 2) {
        _isarrested = "0";
        parametersMap.put("IsArrested", _isarrested);
        resultList = CriminalController.FilterCriminalNotArrested(parametersMap);
    } else {
        //Assuming the arrest status is at 'Both'
        parametersMap.put("IsArrested", _isarrested);
        resultList = CriminalController.FilterCriminalNotArrested(parametersMap);
    }
    LoadCriminalData(resultList);
}//GEN-LAST:event_btn_FilterCriminalActionPerformed

private void btn_ResetCriminalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_ResetCriminalActionPerformed
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");

    txtCriminalFullName.setText("");
    cbxCriminalGender.setSelectedIndex(0);
    txtCriminalPlaceOfBirth.setText("");
    txtCriminalNationality.setText("");
    Calendar cal = Calendar.getInstance();
    try {
        spnMinCriminalDOB.setValue(formatter.parse("01/01/1940"));
        spnMaxCriminalDOB.setValue(cal.getTime());
        spnMinCriminalArrestTIme.setValue(formatter.parse("01/01/1940"));
        spnMaxCriminalArrestTime.setValue(cal.getTime());
    } catch (ParseException ex) {
        Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
    }
    spnMinCriminalHeight.setValue(0);
    spnMaxCriminalHeight.setValue(1000);
    spnMinCriminalWeight.setValue(0);
    spnMaxCriminalWeight.setValue(200);
    txtCriminalHair.setText("");
    txtCriminalRace.setText("");
    txtCriminalAliases.setText("");
    cbxCriminalIsArrested.setSelectedIndex(0);

    btn_Refresh.doClick();
}//GEN-LAST:event_btn_ResetCriminalActionPerformed

private void cbxCriminalIsArrestedItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cbxCriminalIsArrestedItemStateChanged
    if (cbxCriminalIsArrested.getSelectedIndex() == 1) {
        spnMinCriminalArrestTIme.setEnabled(true);
        spnMaxCriminalArrestTime.setEnabled(true);
    } else if (cbxCriminalIsArrested.getSelectedIndex() == 2 || cbxCriminalIsArrested.getSelectedIndex() == 0) {
        spnMinCriminalArrestTIme.setEnabled(false);
        spnMaxCriminalArrestTime.setEnabled(false);
    }
}//GEN-LAST:event_cbxCriminalIsArrestedItemStateChanged

private void btn_AddCriminalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_AddCriminalActionPerformed
    AddCriminal addCriminal = new AddCriminal(null, true);
    //Adding this event will force the Criminal table to refresh automatically once the New Criminal dialog is closed
    addCriminal.addWindowListener(new WindowListener() {

        @Override
        public void windowOpened(WindowEvent e) {
        }

        @Override
        public void windowClosing(WindowEvent e) {
        }

        @Override
        public void windowClosed(WindowEvent e) {
            btn_Refresh.doClick();
        }

        @Override
        public void windowIconified(WindowEvent e) {
        }

        @Override
        public void windowDeiconified(WindowEvent e) {
        }

        @Override
        public void windowActivated(WindowEvent e) {
        }

        @Override
        public void windowDeactivated(WindowEvent e) {
        }
    });
    addCriminal.setVisible(true);
}//GEN-LAST:event_btn_AddCriminalActionPerformed

private void btn_EditCriminalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_EditCriminalActionPerformed
    if (tbl_Criminals.getSelectedRowCount() < 1) {
        JOptionPane.showMessageDialog(null, "No Criminal selected!", "Error Message", JOptionPane.WARNING_MESSAGE);
    } else {
        int _ID = Integer.parseInt(tbl_Criminals.getModel().getValueAt(tbl_Criminals.getSelectedRow(), 0).toString());
        Criminal modifiedCriminal = new Criminal(_ID);
        EditCriminal editCriminal = new EditCriminal(null, true, modifiedCriminal);
        editCriminal.addWindowListener(new WindowListener() {

            @Override
            public void windowOpened(WindowEvent e) {
            }

            @Override
            public void windowClosing(WindowEvent e) {
            }

            @Override
            public void windowClosed(WindowEvent e) {
                btn_Refresh.doClick();
            }

            @Override
            public void windowIconified(WindowEvent e) {
            }

            @Override
            public void windowDeiconified(WindowEvent e) {
            }

            @Override
            public void windowActivated(WindowEvent e) {
            }

            @Override
            public void windowDeactivated(WindowEvent e) {
            }
        });
        editCriminal.setVisible(true);
    }
}//GEN-LAST:event_btn_EditCriminalActionPerformed

private void btn_DetailedCriminalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_DetailedCriminalActionPerformed
    if (tbl_Criminals.getSelectedRowCount() < 1) {
        JOptionPane.showMessageDialog(null, "No Criminal selected!", "Error Message", JOptionPane.WARNING_MESSAGE);
    } else {
        int _ID = Integer.parseInt(tbl_Criminals.getModel().getValueAt(tbl_Criminals.getSelectedRow(), 0).toString());
        DetailedCriminal detailCriminal = new DetailedCriminal(null, true, new Criminal(_ID));
        detailCriminal.setVisible(true);
    }
}//GEN-LAST:event_btn_DetailedCriminalActionPerformed

private void btn_RefreshActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_RefreshActionPerformed
    criminalList = CriminalController.GetCriminals();
    LoadCriminalData(criminalList);
}//GEN-LAST:event_btn_RefreshActionPerformed

private void btn_RefreshCriminalCaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_RefreshCriminalCaseActionPerformed
    criminalList = CriminalController.GetCriminals();
    LoadCriminalCase(criminalList);
}//GEN-LAST:event_btn_RefreshCriminalCaseActionPerformed

private void btn_DetailedWantedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_DetailedWantedActionPerformed
    if (tbl_Wanted.getSelectedRowCount() < 1) {
        JOptionPane.showMessageDialog(null, "No Bounty record selected!", "Error Message", JOptionPane.WARNING_MESSAGE);
    } else {
        int _ID = Integer.parseInt(tbl_Wanted.getModel().getValueAt(tbl_Wanted.getSelectedRow(), 0).toString());
        DetailedWanted detailWanted = new DetailedWanted(null, true, new Wanted(_ID));
        detailWanted.setVisible(true);
    }
}//GEN-LAST:event_btn_DetailedWantedActionPerformed

private void btn_RefreshWantedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_RefreshWantedActionPerformed
    wantedList = WantedController.GetWanteds();
    LoadWantedData(wantedList);
}//GEN-LAST:event_btn_RefreshWantedActionPerformed

private void btn_ResetWantedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_ResetWantedActionPerformed
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");

    Calendar cal = Calendar.getInstance();
    try {
        spnMinWantedDate.setValue(formatter.parse("01/01/1940"));
        spnMaxWantedDate.setValue(cal.getTime());
        spnMinSightingTime.setValue(formatter.parse("01/01/1940"));
        spnMaxSightingTime.setValue(cal.getTime());
    } catch (ParseException ex) {
        Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
    }
    spnMinSightingTime.setEnabled(false);
    spnMaxSightingTime.setEnabled(false);
    spnMinBountyMoney.setValue(0);
    spnMaxBountyMoney.setValue(1000000000);
    txtSightingPlace.setText("");
    cbxInEffect.setSelectedIndex(0);

    btn_RefreshWanted.doClick();
}//GEN-LAST:event_btn_ResetWantedActionPerformed

private void btn_FilterWantedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_FilterWantedActionPerformed
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
    SimpleDateFormat SightingTimeFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss");
    ArrayList<Wanted> resultList = new ArrayList<Wanted>();

    HashMap parametersMap = new HashMap();
    Date _minWantedDate = null;
    Date _maxWantedDate = null;
    try {
        String dateString = formatter.format(spnMinWantedDate.getValue());
        _minWantedDate = formatter.parse(dateString);
        dateString = formatter.format(spnMaxWantedDate.getValue());
        _maxWantedDate = formatter.parse(dateString);
    } catch (ParseException ex) {
        Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
    }
    parametersMap.put("MinWantedDate", _minWantedDate);
    parametersMap.put("MaxWantedDate", _maxWantedDate);
    parametersMap.put("MinBountyMoney", Integer.parseInt(spnMinBountyMoney.getValue().toString()));
    parametersMap.put("MaxBountyMoney", Integer.parseInt(spnMaxBountyMoney.getValue().toString()));
    parametersMap.put("SightingPlace", txtSightingPlace.getText().trim());
    Date _minSightingTime = null;
    Date _maxSightingTime = null;
    try {
        String dateString = SightingTimeFormat.format(spnMinSightingTime.getValue());
        _minSightingTime = SightingTimeFormat.parse(dateString);
        dateString = SightingTimeFormat.format(spnMaxSightingTime.getValue());
        _maxSightingTime = SightingTimeFormat.parse(dateString);
    } catch (ParseException ex) {
        Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
    }
    parametersMap.put("MinSightingTime", _minSightingTime);
    parametersMap.put("MaxSightingTime", _maxSightingTime);
    String _inEffect = "";
    if (cbxInEffect.getSelectedIndex() == 1) {
        _inEffect = "1";
    } else if (cbxInEffect.getSelectedIndex() == 2) {
        _inEffect = "0";
    }
    parametersMap.put("InEffect", _inEffect);
    if (txtSightingPlace.getText().trim().isEmpty()) {
        resultList = WantedController.FilterWantedNotSighted(parametersMap);
    } else {
        resultList = WantedController.FilterWanted(parametersMap);
    }
    LoadWantedData(resultList);
}//GEN-LAST:event_btn_FilterWantedActionPerformed

private void txtSightingPlaceFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtSightingPlaceFocusLost
    if (txtSightingPlace.getText().trim().isEmpty()) {
        spnMinSightingTime.setEnabled(false);
        spnMaxSightingTime.setEnabled(false);
    } else {
        spnMinSightingTime.setEnabled(true);
        spnMaxSightingTime.setEnabled(true);
    }
}//GEN-LAST:event_txtSightingPlaceFocusLost

private void btn_FilterPrisonerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_FilterPrisonerActionPerformed
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
    ArrayList<Prisoner> resultList = new ArrayList<Prisoner>();

    HashMap parametersMap = new HashMap();
    Date _minImprisonDate = null;
    Date _maxImprisonDate = null;
    try {
        String dateString = formatter.format(spnMinImprisonDate.getValue());
        _minImprisonDate = formatter.parse(dateString);
        dateString = formatter.format(spnMaxImprisonDate.getValue());
        _maxImprisonDate = formatter.parse(dateString);
    } catch (ParseException ex) {
        Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
    }
    parametersMap.put("MinImprisonDate", _minImprisonDate);
    parametersMap.put("MaxImprisonDate", _maxImprisonDate);
    parametersMap.put("PrisonName", txtPrisonName.getText());
    parametersMap.put("CellNumber", txtCellNumber.getText());
    Date _minReleaseDate = null;
    Date _maxReleaseDate = null;
    try {
        String dateString = formatter.format(spnMinReleaseDate.getValue());
        _minReleaseDate = formatter.parse(dateString);
        dateString = formatter.format(spnMaxReleaseDate.getValue());
        _maxReleaseDate = formatter.parse(dateString);
    } catch (ParseException ex) {
        Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
    }
    parametersMap.put("MinReleaseDate", _minReleaseDate);
    parametersMap.put("MaxReleaseDate", _maxReleaseDate);
    String _isReleased = "";
    if (cbxIsReleased.getSelectedIndex() == 1) {
        _isReleased = "1";
    } else if (cbxIsReleased.getSelectedIndex() == 2) {
        _isReleased = "0";
    }
    parametersMap.put("IsReleased", _isReleased);
    parametersMap.put("ReleaseReason", txtReleaseReason.getText());

    if (chxHasReleaseDate.isSelected()) {
        resultList = PrisonerController.FilterPrisoner(parametersMap);
    } else {
        resultList = PrisonerController.FilterPrisonerNoReleaseDate(parametersMap);
    }
    LoadPrisonerData(resultList);
}//GEN-LAST:event_btn_FilterPrisonerActionPerformed

private void btn_ResetPrisonerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_ResetPrisonerActionPerformed
    SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy");
    Calendar cal = Calendar.getInstance();
    try {
        spnMinImprisonDate.setValue(formatter.parse("1/1/1940"));
        spnMaxImprisonDate.setValue(cal.getTime());
        spnMinReleaseDate.setValue(formatter.parse("01/01/1940"));
        spnMaxReleaseDate.setValue(cal.getTime());
    } catch (ParseException ex) {
        Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
    }
    txtPrisonName.setText("");
    txtCellNumber.setText("");
    chxHasReleaseDate.setSelected(false);
    cbxIsReleased.setSelectedIndex(0);
    txtReleaseReason.setText("");

    btn_RefreshPrisoner.doClick();
}//GEN-LAST:event_btn_ResetPrisonerActionPerformed

private void chxHasReleaseDateItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chxHasReleaseDateItemStateChanged
    spnMinReleaseDate.setEnabled(chxHasReleaseDate.isSelected());
    spnMaxReleaseDate.setEnabled(chxHasReleaseDate.isSelected());
}//GEN-LAST:event_chxHasReleaseDateItemStateChanged

private void btn_AddPrisonerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_AddPrisonerActionPerformed
    AddPrisoner addPrisoner = new AddPrisoner(null, true);
    addPrisoner.addWindowListener(new WindowListener() {

        @Override
        public void windowOpened(WindowEvent e) {
        }

        @Override
        public void windowClosing(WindowEvent e) {
        }

        @Override
        public void windowClosed(WindowEvent e) {
            btn_RefreshPrisoner.doClick();
        }

        @Override
        public void windowIconified(WindowEvent e) {
        }

        @Override
        public void windowDeiconified(WindowEvent e) {
        }

        @Override
        public void windowActivated(WindowEvent e) {
        }

        @Override
        public void windowDeactivated(WindowEvent e) {
        }
    });
    addPrisoner.setVisible(true);
}//GEN-LAST:event_btn_AddPrisonerActionPerformed

private void btn_EditPrisonerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_EditPrisonerActionPerformed
    if (tbl_Prisoner.getSelectedRowCount() < 1) {
        JOptionPane.showMessageDialog(null, "No Prisoner selected!", "Error Message", JOptionPane.WARNING_MESSAGE);
    } else {
        int _ID = Integer.parseInt(tbl_Prisoner.getModel().getValueAt(tbl_Prisoner.getSelectedRow(), 0).toString());
        Prisoner modifiedPrisoner = new Prisoner(_ID);
        EditPrisoner editPrisoner = new EditPrisoner(null, true, modifiedPrisoner);
        editPrisoner.addWindowListener(new WindowListener() {

            @Override
            public void windowOpened(WindowEvent e) {
            }

            @Override
            public void windowClosing(WindowEvent e) {
            }

            @Override
            public void windowClosed(WindowEvent e) {
                btn_RefreshPrisoner.doClick();
            }

            @Override
            public void windowIconified(WindowEvent e) {
            }

            @Override
            public void windowDeiconified(WindowEvent e) {
            }

            @Override
            public void windowActivated(WindowEvent e) {
            }

            @Override
            public void windowDeactivated(WindowEvent e) {
            }
        });
        editPrisoner.setVisible(true);
    }
}//GEN-LAST:event_btn_EditPrisonerActionPerformed

private void btn_DetailedPrisonerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_DetailedPrisonerActionPerformed
    if (tbl_Prisoner.getSelectedRowCount() < 1) {
        JOptionPane.showMessageDialog(null, "No Prisoner selected!", "Error Message", JOptionPane.WARNING_MESSAGE);
    } else {
        int _ID = Integer.parseInt(tbl_Prisoner.getModel().getValueAt(tbl_Prisoner.getSelectedRow(), 0).toString());
        DetailedPrisoner detailPrisoner = new DetailedPrisoner(null, true, new Prisoner(_ID));
        detailPrisoner.setVisible(true);
    }
}//GEN-LAST:event_btn_DetailedPrisonerActionPerformed

private void btn_RefreshPrisonerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_RefreshPrisonerActionPerformed
    prisonerList = PrisonerController.GetPrisoners();
    LoadPrisonerData(prisonerList);
}//GEN-LAST:event_btn_RefreshPrisonerActionPerformed

    private void butAddNewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butAddNewActionPerformed
        comLeadOfficerID.enable(true);
        SimpleDateFormat formatter = new SimpleDateFormat("DD/mm/yyyy");
        //||  ||  || 
        if (txtCasetype.getText().trim().length() == 0) {
            JOptionPane.showConfirmDialog(null, "You must Enter Case Type", "Error Message", JOptionPane.WARNING_MESSAGE);

        } else if (txtCasePlace.getText().trim().length() == 0) {
            JOptionPane.showConfirmDialog(null, "You must Enter Case Place", "Error Message", JOptionPane.WARNING_MESSAGE);

        } else if (txtCaseDescriptions.getText().trim().length() == 0) {
            JOptionPane.showConfirmDialog(null, "You must Enter Case Descriptions", "Error Message", JOptionPane.WARNING_MESSAGE);
        } else {
            Cases cases = new Cases();
            //set enable or disable Prosecution Desire
            cases.setProsecutionDesire(ckProsecution.isSelected());
            cases.setCaseType(txtCasetype.getText());
            //set time 
            String strCaseTime = formatter.format(spnnCaseTime.getValue());
            try {
                cases.setCaseTime(formatter.parse(strCaseTime));
            } catch (ParseException ex) {
                ex.printStackTrace();
            }
            String strReportTime = formatter.format(spnnReportTime.getValue());
            try {
                cases.setReportedTime(formatter.parse(strReportTime));
            } catch (ParseException ex) {
                ex.printStackTrace();
            }
            String strApprovalDate = formatter.format(spnnApprovalDate.getValue());
            try {
                cases.setApprovalDate(formatter.parse(strApprovalDate));
            } catch (ParseException ex) {
                ex.printStackTrace();
            }
            //set case place
            cases.setCasePlace(txtCasePlace.getText());
            //set case Descriptions
            cases.setCaseDescriptions(txtCaseDescriptions.getText());
            cases.setCaseInvolvements(txtCaseInvolvements.getText());
            cases.setCaseStatus(Integer.parseInt(combCaseStatus.getSelectedItem().toString()));
            //set case
            cases.setLeadOfficerID(Integer.parseInt(comLeadOfficerID.getSelectedItem().toString()));
            //System.out.println(Integer.parseInt(comLeadOfficerID.getSelectedItem().toString()) + 1);
            cases.setApprovalDirectorID(Integer.parseInt(comLeadOfficerID.getSelectedItem().toString()));
            if (CaseHistoryDAO.addNewCases(cases)) {
                JOptionPane.showConfirmDialog(null, "Add New successful", "Error Message", JOptionPane.WARNING_MESSAGE);
            } else {
                JOptionPane.showConfirmDialog(null, "Add New Not successful", "Error Message", JOptionPane.WARNING_MESSAGE);
            }
            //set case
        }
    }//GEN-LAST:event_butAddNewActionPerformed

    private void butShowActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butShowActionPerformed
        comLeadOfficerID.enable(true);
        SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss");

        List<Cases> lisCase = CaseHistoryDAO.loadAllCase();
        while (tblModel.getRowCount() > 0) {
            tblModel.removeRow(0);
        }
        for (Cases cases : lisCase) {
            String strCaseTime = formatter.format(cases.getCaseTime());
            String strReportTime = formatter.format(cases.getReportedTime());
            String strApprovalDate = formatter.format(cases.getApprovalDate());
            tblModel.addRow(new String[]{cases.getCaseID() + "", cases.getCaseType(), strCaseTime, strReportTime, strApprovalDate,
                        cases.getCaseInvolvements(), cases.getCaseStatus() + "", cases.isProsecutionDesire() ? "Prosecuted" : "Unprosecuted", cases.getLeadOfficerID() + ""});
        }
    }//GEN-LAST:event_butShowActionPerformed

    private void butSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butSearchActionPerformed
        comLeadOfficerID.enable(true);
        SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss");
        String caseType = txtCasetype.getText();
        List<Cases> lisCase = CaseHistoryDAO.loadByCaseType(caseType);
        while (tblModel.getRowCount() > 0) {
            tblModel.removeRow(0);
        }
        for (Cases cases : lisCase) {
            String strCaseTime = formatter.format(cases.getCaseTime());
            String strReportTime = formatter.format(cases.getReportedTime());
            String strApprovalDate = formatter.format(cases.getApprovalDate());
            tblModel.addRow(new String[]{cases.getCaseID() + "", cases.getCaseType(), strCaseTime, strReportTime, strApprovalDate,
                        cases.getCaseInvolvements(), cases.getCaseStatus() + "", cases.isProsecutionDesire() ? "Prosecuted" : "Unprosecuted", cases.getLeadOfficerID() + ""});
        }
    }//GEN-LAST:event_butSearchActionPerformed

    private void tblCaseHistoryMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tblCaseHistoryMouseClicked
        selectedRow = tblCaseHistory.getSelectedRow();
        String caseID = (String) tblCaseHistory.getValueAt(selectedRow, 0);
        //String caseType = (String) tblCaseHistory.getValueAt(selectedRow, 1);
        txtCaseID.setText(caseID);
        comLeadOfficerID.enable(false);
    }//GEN-LAST:event_tblCaseHistoryMouseClicked

    private void butEditActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butEditActionPerformed
        comLeadOfficerID.enable(true);
        SimpleDateFormat formatter = new SimpleDateFormat("DD/mm/yyyy");
        Cases cases = new Cases();
        //set enable or disable Prosecution Desire
        cases.setCaseID(Integer.parseInt(txtCaseID.getText()));
        cases.setProsecutionDesire(ckProsecution.isSelected());
        cases.setCaseType(txtCasetype.getText());
        //set time 
        String strCaseTime = formatter.format(spnnCaseTime.getValue());
        try {
            cases.setCaseTime(formatter.parse(strCaseTime));
        } catch (ParseException ex) {
            ex.printStackTrace();
        }
        String strReportTime = formatter.format(spnnReportTime.getValue());
        try {
            cases.setReportedTime(formatter.parse(strReportTime));
        } catch (ParseException ex) {
            ex.printStackTrace();
        }
        String strApprovalDate = formatter.format(spnnApprovalDate.getValue());
        try {
            cases.setApprovalDate(formatter.parse(strApprovalDate));
        } catch (ParseException ex) {
            ex.printStackTrace();
        }
        //set case place
        cases.setCasePlace(txtCasePlace.getText());
        //set case Descriptions
        cases.setCaseDescriptions(txtCaseDescriptions.getText());
        cases.setCaseInvolvements(txtCaseInvolvements.getText());
        cases.setCaseStatus(Integer.parseInt(combCaseStatus.getSelectedItem().toString()));
        //set case
        cases.setLeadOfficerID(Integer.parseInt(comLeadOfficerID.getSelectedItem().toString()));
        //System.out.println(Integer.parseInt(comLeadOfficerID.getSelectedItem().toString()) + 1);
        cases.setApprovalDirectorID(Integer.parseInt(comLeadOfficerID.getSelectedItem().toString()));

        if (CaseHistoryDAO.editCases(cases)) {
            JOptionPane.showConfirmDialog(null, "Edit successful", "Error Message", JOptionPane.WARNING_MESSAGE);
        } else {
            JOptionPane.showConfirmDialog(null, "Edit Not successful", "Error Message", JOptionPane.WARNING_MESSAGE);
        }
    }//GEN-LAST:event_butEditActionPerformed

    private void butDetailActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butDetailActionPerformed
        if (tblCaseHistory.getSelectedRowCount() < 1) {
            JOptionPane.showMessageDialog(null, "No Casehostory selected!", "Error Message", JOptionPane.WARNING_MESSAGE);
        } else {
            selectedRow = tblCaseHistory.getSelectedRow();
            String _caseID = (String) tblCaseHistory.getValueAt(selectedRow, 0);
            //String caseType = (String) tblCaseHistory.getValueAt(selectedRow, 1);
            DialogCaseHistoryDetail detail = new DialogCaseHistoryDetail(null, true, new Cases(Integer.parseInt(_caseID)));
            detail.setSize(400, 300);
            detail.setVisible(true);
        }
    }//GEN-LAST:event_butDetailActionPerformed

    private void butResetActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butResetActionPerformed
        txtCaseDescriptions.setText(null);
        txtCaseID.setToolTipText(null);
        txtCaseInvolvements.setText(null);
        txtCasePlace.setText(null);
        txtCasetype.setText(null);
    }//GEN-LAST:event_butResetActionPerformed

    private void butAddNew2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butAddNew2ActionPerformed
        SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss");
        if (txtMortalityName.getText().trim().length() == 0) {
            JOptionPane.showConfirmDialog(null, "You must Enter Mortality Name", "Error Message", JOptionPane.WARNING_MESSAGE);

        } else if (txtCauseOfDeath.getText().trim().length() == 0) {
            JOptionPane.showConfirmDialog(null, "You must Enter Cause Of Death", "Error Message", JOptionPane.WARNING_MESSAGE);
        } else if (txtDoctorName.getText().trim().length() == 0) {
            JOptionPane.showConfirmDialog(null, "You must Enter Doctor Name", "Error Message", JOptionPane.WARNING_MESSAGE);
        } else {
            PostMortem postMortem = new PostMortem();
            //set case ID
            postMortem.setCaseID(Integer.parseInt(comboxCaseID.getSelectedItem().toString()));
            //set causeOfDate
            postMortem.setCauseOfDeath(txtCauseOfDeath.getText());
            postMortem.setMortalityName(txtMortalityName.getText());
            postMortem.setDoctorName(txtDoctorName.getText());
            String strCheckInDate = formatter.format(spnnCheckInDate.getValue());
            String strMortalityTime = formatter.format(spnnCheckInDate.getValue());
            try {
                postMortem.setCheckInDate(formatter.parse(strCheckInDate));
                postMortem.setMortalityTime(formatter.parse(strMortalityTime));
            } catch (ParseException ex) {
                ex.printStackTrace();
            }
            //execu Update
            if (ManagingPosMortemDAO.addNewPosMortem(postMortem)) {
                JOptionPane.showConfirmDialog(null, "Add New successful", "Error Message", JOptionPane.WARNING_MESSAGE);
            } else {
                JOptionPane.showConfirmDialog(null, "Add New not successful", "Error Message", JOptionPane.WARNING_MESSAGE);
            }
        }
    }//GEN-LAST:event_butAddNew2ActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu accountMenu;
    private Views.AddComplaint addComplaint1;
    private javax.swing.JButton btn_AddCriminal;
    private javax.swing.JButton btn_AddPrisoner;
    private javax.swing.JButton btn_DetailedCriminal;
    private javax.swing.JButton btn_DetailedPrisoner;
    private javax.swing.JButton btn_DetailedWanted;
    private javax.swing.JButton btn_EditCriminal;
    private javax.swing.JButton btn_EditPrisoner;
    private javax.swing.JButton btn_FilterCriminal;
    private javax.swing.JButton btn_FilterPrisoner;
    private javax.swing.JButton btn_FilterWanted;
    private javax.swing.JButton btn_Refresh;
    private javax.swing.JButton btn_RefreshCriminalCase;
    private javax.swing.JButton btn_RefreshPrisoner;
    private javax.swing.JButton btn_RefreshWanted;
    private javax.swing.JButton btn_ResetCriminal;
    private javax.swing.JButton btn_ResetPrisoner;
    private javax.swing.JButton btn_ResetWanted;
    private javax.swing.JButton butAddNew;
    private javax.swing.JButton butAddNew1;
    private javax.swing.JButton butAddNew2;
    private javax.swing.JButton butDetail;
    private javax.swing.JButton butEdit;
    private javax.swing.JButton butEdit1;
    private javax.swing.JButton butEdit2;
    private javax.swing.JButton butReset;
    private javax.swing.JButton butSearch;
    private javax.swing.JButton butSearch1;
    private javax.swing.JButton butSearch2;
    private javax.swing.JButton butShow;
    private javax.swing.JButton butShow1;
    private javax.swing.JComboBox cbxCriminalGender;
    private javax.swing.JComboBox cbxCriminalIsArrested;
    private javax.swing.JComboBox cbxInEffect;
    private javax.swing.JComboBox cbxIsReleased;
    private javax.swing.JCheckBox chxHasReleaseDate;
    private javax.swing.JCheckBox ckProsecution;
    private javax.swing.JComboBox comLeadOfficerID;
    private javax.swing.JComboBox comLeadOfficerID1;
    private javax.swing.JComboBox combCaseStatus;
    private javax.swing.JComboBox comboxCaseID;
    private javax.swing.JMenuItem exit;
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel52;
    private javax.swing.JLabel jLabel53;
    private javax.swing.JLabel jLabel54;
    private javax.swing.JLabel jLabel55;
    private javax.swing.JLabel jLabel56;
    private javax.swing.JLabel jLabel57;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel59;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel60;
    private javax.swing.JLabel jLabel61;
    private javax.swing.JLabel jLabel62;
    private javax.swing.JLabel jLabel63;
    private javax.swing.JLabel jLabel64;
    private javax.swing.JLabel jLabel65;
    private javax.swing.JLabel jLabel66;
    private javax.swing.JLabel jLabel67;
    private javax.swing.JLabel jLabel68;
    private javax.swing.JLabel jLabel69;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel70;
    private javax.swing.JLabel jLabel71;
    private javax.swing.JLabel jLabel72;
    private javax.swing.JLabel jLabel73;
    private javax.swing.JLabel jLabel74;
    private javax.swing.JLabel jLabel75;
    private javax.swing.JLabel jLabel76;
    private javax.swing.JLabel jLabel77;
    private javax.swing.JLabel jLabel78;
    private javax.swing.JLabel jLabel79;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel80;
    private javax.swing.JLabel jLabel81;
    private javax.swing.JLabel jLabel82;
    private javax.swing.JLabel jLabel83;
    private javax.swing.JLabel jLabel84;
    private javax.swing.JLabel jLabel85;
    private javax.swing.JLabel jLabel86;
    private javax.swing.JLabel jLabel87;
    private javax.swing.JLabel jLabel88;
    private javax.swing.JLabel jLabel89;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabel90;
    private javax.swing.JLabel jLabel91;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel40;
    private javax.swing.JPanel jPanel41;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JScrollPane jScrollPane17;
    private javax.swing.JScrollPane jScrollPane18;
    private javax.swing.JScrollPane jScrollPane19;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane20;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JSplitPane jSplitPane2;
    private javax.swing.JSplitPane jSplitPane3;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTabbedPane jTabbedPane3;
    private javax.swing.JLabel lblCaseTime;
    private javax.swing.JLabel lblCaseType;
    private javax.swing.JLabel lblInvolvements;
    private javax.swing.JMenuItem logOut;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenuItem profile;
    private javax.swing.JSpinner spnMaxBountyMoney;
    private javax.swing.JSpinner spnMaxCriminalArrestTime;
    private javax.swing.JSpinner spnMaxCriminalDOB;
    private javax.swing.JSpinner spnMaxCriminalHeight;
    private javax.swing.JSpinner spnMaxCriminalWeight;
    private javax.swing.JSpinner spnMaxImprisonDate;
    private javax.swing.JSpinner spnMaxReleaseDate;
    private javax.swing.JSpinner spnMaxSightingTime;
    private javax.swing.JSpinner spnMaxWantedDate;
    private javax.swing.JSpinner spnMinBountyMoney;
    private javax.swing.JSpinner spnMinCriminalArrestTIme;
    private javax.swing.JSpinner spnMinCriminalDOB;
    private javax.swing.JSpinner spnMinCriminalHeight;
    private javax.swing.JSpinner spnMinCriminalWeight;
    private javax.swing.JSpinner spnMinImprisonDate;
    private javax.swing.JSpinner spnMinReleaseDate;
    private javax.swing.JSpinner spnMinSightingTime;
    private javax.swing.JSpinner spnMinWantedDate;
    private javax.swing.JSpinner spnnApprovalDate;
    private javax.swing.JSpinner spnnCaseTime;
    private javax.swing.JSpinner spnnCheckInDate;
    private javax.swing.JSpinner spnnMortalityTime;
    private javax.swing.JSpinner spnnReportTime;
    private javax.swing.JTable tblCaseHistory;
    private javax.swing.JTable tblFIRManagement;
    private javax.swing.JTable tblPosmortem;
    private javax.swing.JTable tbl_CriminalCase;
    private javax.swing.JTable tbl_CriminalRecord;
    private javax.swing.JTable tbl_Criminals;
    private javax.swing.JTable tbl_Prisoner;
    private javax.swing.JTable tbl_Wanted;
    private javax.swing.JTextArea txtCaseDescriptions;
    private javax.swing.JTextArea txtCaseDescriptions1;
    private javax.swing.JTextField txtCaseID;
    private javax.swing.JTextArea txtCaseInvolvements;
    private javax.swing.JTextArea txtCaseInvolvements1;
    private javax.swing.JTextArea txtCasePlace;
    private javax.swing.JTextArea txtCasePlace1;
    private javax.swing.JTextField txtCasetype;
    private javax.swing.JTextArea txtCauseOfDeath;
    private javax.swing.JTextField txtCellNumber;
    private javax.swing.JTextField txtCriminalAliases;
    private javax.swing.JTextField txtCriminalFullName;
    private javax.swing.JTextField txtCriminalHair;
    private javax.swing.JTextField txtCriminalNationality;
    private javax.swing.JTextField txtCriminalPlaceOfBirth;
    private javax.swing.JTextField txtCriminalRace;
    private javax.swing.JTextField txtDelayReasons;
    private javax.swing.JTextArea txtDoctorName;
    private javax.swing.JTextField txtFIRTime;
    private javax.swing.JTextField txtInformationType;
    private javax.swing.JTextField txtInformerAddress;
    private javax.swing.JTextField txtInformerName;
    private javax.swing.JTextField txtInformerPhone;
    private javax.swing.JTextArea txtMortalityName;
    private javax.swing.JTextField txtOffencePlace;
    private javax.swing.JTextField txtOffenceTime;
    private javax.swing.JTextField txtPrisonName;
    private javax.swing.JTextArea txtReleaseReason;
    private javax.swing.JTextField txtSightingPlace;
    private javax.swing.JTextField txtStolenProperties;
    private javax.swing.JTextField txtStolenValue;
    private javax.swing.JTextArea txtSuspectDescriptions;
    // End of variables declaration//GEN-END:variables
    private String[] userProperties = PropertiesUtility.getUserProperties();

    private void LoadCriminalData(ArrayList<Criminal> listToLoad) {
        DefaultTableModel dtm = (DefaultTableModel) tbl_Criminals.getModel();
        while (dtm.getRowCount() > 0) {
            dtm.removeRow(0);
        }
        Vector row;
        SimpleDateFormat DOBFormat = new SimpleDateFormat("MM/dd/yyyy");
        SimpleDateFormat ArrestedTimeFormat = new SimpleDateFormat("MM/dd/yyyy hh:mm:ss");
        //Now we loop through the criminal list to get what we need
        if (listToLoad != null) {
            for (int i = 0; i < listToLoad.size(); i++) {
                Criminal _criminal = listToLoad.get(i);
                row = new Vector();
                row.addElement(_criminal.getID());
                row.addElement(_criminal.getFullName());
                //For Gender column, we must do a gender check
                if (_criminal.isGender()) {
                    row.addElement("Male");
                } else {
                    row.addElement("Female");
                }
                row.addElement(DOBFormat.format(_criminal.getDateOfBirth()));
                row.addElement(_criminal.getNationality());
                row.addElement(_criminal.isIsArrested());
                //Make sure that null arrested time will not be formatted
                if (_criminal.getArrestedTime() != null) {
                    row.addElement(ArrestedTimeFormat.format(_criminal.getArrestedTime()));
                }
                dtm.addRow(row);
            }
        }
    }

    private void LoadWantedData(ArrayList<Wanted> listToLoad) {
        DefaultTableModel dtm = (DefaultTableModel) tbl_Wanted.getModel();
        while (dtm.getRowCount() > 0) {
            dtm.removeRow(0);
        }
        Vector row;
        SimpleDateFormat WDFormat = new SimpleDateFormat("MM/dd/yyyy");
        if (listToLoad != null) {
            for (int i = 0; i < listToLoad.size(); i++) {
                Wanted _wanted = listToLoad.get(i);
                row = new Vector();
                row.addElement(_wanted.getID());
                row.addElement(_wanted.getRelatedCriminal().getFullName());
                row.addElement(WDFormat.format(_wanted.getWantedDate()));
                row.addElement(_wanted.getBountyMoney());
                row.addElement(_wanted.isInEffect());
                dtm.addRow(row);
            }
        }
    }

    private void LoadPrisonerData(ArrayList<Prisoner> listToLoad) {
        DefaultTableModel dtm = (DefaultTableModel) tbl_Prisoner.getModel();
        while (dtm.getRowCount() > 0) {
            dtm.removeRow(0);
        }
        Vector row;
        SimpleDateFormat IDFormat = new SimpleDateFormat("MM/dd/yyyy");
        if (listToLoad != null) {
            for (int i = 0; i < listToLoad.size(); i++) {
                Prisoner _prisoner = listToLoad.get(i);
                row = new Vector();
                row.addElement(_prisoner.getID());
                row.addElement(_prisoner.getRelatedCriminal().getFullName());
                row.addElement(IDFormat.format(_prisoner.getImprisonDate()));
                if (_prisoner.getReleaseDate() == null) {
                    row.addElement("None");
                } else {
                    row.addElement(IDFormat.format(_prisoner.getReleaseDate()));
                }
                row.addElement(_prisoner.getPrisonName());
                row.addElement(_prisoner.isIsReleased());
                dtm.addRow(row);
            }
        }
    }

    private void LoadCriminalCase(ArrayList<Criminal> listToLoad) {
        DefaultTableModel dtm = (DefaultTableModel) tbl_CriminalCase.getModel();
        while (dtm.getRowCount() > 0) {
            dtm.removeRow(0);
        }
        Vector row;
        if (listToLoad != null) {
            for (int i = 0; i < listToLoad.size(); i++) {
                Criminal _criminal = listToLoad.get(i);
                row = new Vector();
                row.addElement(_criminal.getID());
                row.addElement(_criminal.getFullName());
                dtm.addRow(row);
            }
        }
    }

    private ListSelectionListener tbl_CriminalCaseSelected() {
        return new ListSelectionListener() {

            @Override
            public void valueChanged(ListSelectionEvent e) {
                if (e.getValueIsAdjusting()) {
                    DefaultTableModel dtm = (DefaultTableModel) tbl_CriminalRecord.getModel();
                    while (dtm.getRowCount() > 0) {
                        dtm.removeRow(0);
                    }
                    if (tbl_CriminalCase.getSelectedRowCount() > 0) {
                        try {
                            int _ID = Integer.parseInt(tbl_CriminalCase.getModel().getValueAt(tbl_CriminalCase.getSelectedRow(), 0).toString());
                            ResultSet rs = CriminalController.getCriminalPerCase(_ID);

                            if (rs.next()) {
                                rs.beforeFirst();
                                while (rs.next()) {
                                    Vector row = new Vector();
                                    row.addElement(rs.getInt("CaseID"));
                                    row.addElement(rs.getString("Charge"));
                                    row.addElement(rs.getString("RoleInCase"));
                                    dtm.addRow(row);
                                }
                            }
                        } catch (SQLException ex) {
                            Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
                        }
                    }
                }
            }
        };
    }

    private ListSelectionListener tbl_CriminalRecordSelected() {
        return new ListSelectionListener() {

            @Override
            public void valueChanged(ListSelectionEvent e) {
                if (e.getValueIsAdjusting()) {
                    if (tbl_CriminalRecord.getSelectedRowCount() > 0) {
                        try {
                            int _caseID = Integer.parseInt(tbl_CriminalRecord.getModel().getValueAt(tbl_CriminalRecord.getSelectedRow(), 0).toString());
                            int _criminalID = Integer.parseInt(tbl_CriminalCase.getModel().getValueAt(tbl_CriminalCase.getSelectedRow(), 0).toString());
                            ResultSet rs = CriminalController.getCaseDetailPerCriminal(_criminalID, _caseID);

                            if (rs.next()) {
                                lblCaseType.setText(rs.getString("CaseType"));
                                SimpleDateFormat formattter = new SimpleDateFormat("MM/dd/yyyy");
                                lblCaseTime.setText(formattter.format(rs.getDate("CaseTime")));
                                txtCasePlace.setText(rs.getString("CasePlace"));
                                txtCaseInvolvements.setText(rs.getString("CaseInvolvements"));
                                txtCaseDescriptions.setText(rs.getString("CaseDescriptions"));
                            }
                        } catch (SQLException ex) {
                            Logger.getLogger(NewJFrame1.class.getName()).log(Level.SEVERE, null, ex);
                        }
                    }
                }
                if (tbl_CriminalRecord.getSelectedRowCount() < 1) {
                    lblCaseType.setText("");
                    lblCaseTime.setText("");
                    txtCasePlace.setText("");
                    txtCaseInvolvements.setText("");
                    txtCaseDescriptions.setText("");
                }
            }
        };
    }

    private void loadDataCombobox() {
        AccountDAO accDAO = new AccountDAO();
        ArrayList<Account> listAcc = accDAO.loadALL();
        comLeadOfficerID.removeAllItems();
        for (Account accounts : listAcc) {
            //comModel.addElement(accounts.getAccSerialNo());
            accIDList.add(accounts.getID());
            comLeadOfficerID.addItem(accounts.getID());
        }
    }

    private void loadDataCaseCombobox() {
        CaseHistoryDAO caseDAO = new CaseHistoryDAO();
        ArrayList<Cases> listCase = caseDAO.loadALL();
        comboxCaseID.removeAllItems();
        for (Cases cases : listCase) {
            caseIDList.add(cases.getCaseID());
            comboxCaseID.addItem(cases.getCaseID());
        }

    }

    private void loadDataAllTable() {

        List<PostMortem> listPostMortem = ManagingPosMortemDAO.loadAllPostMortem();
        while (tblPosmortem.getRowCount() > 0) {
            tblPosmortem.remove(0);

        }

        for (PostMortem postMortem : listPostMortem) {
            tblModel.addRow(new String[]{String.valueOf(postMortem.getCaseID()), postMortem.getMortalityName(), postMortem.getMortalityTime().toString()});
        }
    }
}
